Complex type class not being serialized by XmlSerializer
<p>So i have classes:</p>

<pre><code>public class classA : BaseClass
{
    public classA(){}
}


public abstract class BaseClass
{
    public ComplexTypeClass Total { get; set; }
    public List&lt;Item&gt; Items {get; set; } 
    //some other properties
}


public class ComplexTypeClass : ValueObject&lt;ComplexTypeClass&gt;
{
    public ComplexTypeClass()
    {
    }
    public ComplexTypeClass(decimal p1, decimal p2, decimal p)
    {
        P1 = p1;
        P2 = p2;
        P3 = p3;
    }
    public decimal P1 { get; }
    public decimal P2 { get; }
    public decimal P3 { get; }

    //some methods and validations
}


public abstract class ValueObject&lt;T&gt; : IEquatable&lt;T&gt;, IValidatableObject where T : ValueObject&lt;T&gt;
{
    //all implemented interfaces methods
}
</code></pre>

<p>And then I try serialize <code>classA</code>, all properties and list are serialized properly, except the <code>ComplexTypeClass</code> property. For this property I get such line in xml <code>&lt;Total /&gt;</code>.</p>

<p>All classes have <code>[Serializable]</code>, <code>[ComplexType]</code>, <code>[XmlType]</code> attributes. I have tried different combinations as well. I have tried using <code>[XmlElement]</code>, <code>[XmlRoot]</code> on <code>ComplexTypeClass</code> property. However that did nothing.</p>

<p>I do have another complex type class, which does not have interfaces, and this class is serialized properly.</p>

<p>Does these interfaces has to do anything? Or am i missing something simple and small?</p>

<p><strong>Edit:</strong> getting rid of interfaces did not help.</p>