G
Guest
I have an object which contains an interface member
ie:
[XmlRoot]
public class MyClass
{
[XmlElement]
public IMyInterface implementingClass;
}
where the implementing class is set at runtime to a valid object which is
marked up for XmlSerialization. But when I try to declare a XmlSerializer
class it throws an exception saying that an interface cannot be serialized,
even though the class at runtime can be.
Is there anyway of marking the interface as XmlSerializable or a
method/interface that I can implement that will take care of that
functionality for me?
Thanks in advance for any help!
Matt
ie:
[XmlRoot]
public class MyClass
{
[XmlElement]
public IMyInterface implementingClass;
}
where the implementing class is set at runtime to a valid object which is
marked up for XmlSerialization. But when I try to declare a XmlSerializer
class it throws an exception saying that an interface cannot be serialized,
even though the class at runtime can be.
Is there anyway of marking the interface as XmlSerializable or a
method/interface that I can implement that will take care of that
functionality for me?
Thanks in advance for any help!
Matt