WCF : [XmlElement, typeof] in DataMember attribute



I want to do something like :



[XmlElement("Foo1", typeof(Foo1Type))]
[XmlElement("Foo2", typeof(Foo2Type))]
public object Foo { get; set; }


But i would to do this with the DataContractSerializer for WCF. Something similar in Datamember attribute.


I aim to assign dynamically tags according to their types.


Thank you.


No comments:

Post a Comment