mardi 4 octobre 2016

Reflection error when serializing properties

I have problems with serializing properties, which are classes implementing some interface.

public class A : InterfaceA
{
    public A()
    {
    }
}

public interface InterfaceA
{

}

public class B
{
    public A PropertyA { get; set; }
}

I'm aware of the problem around serializing interfaces and abstract classes. But does this also belong to properties, which somewhere implement an interface? Isn't this a strong restriction? Shouldn't the Serializer stop reflecting types, when it hits an interface?





Aucun commentaire:

Enregistrer un commentaire