Hi I refer to an archived discussion titled inherited classes and xml.serialization
I seem to have the same situation, i have two classes B and C inheriting class A, class A includes both types B and C as seen below
<System.Xml.Serialization.XmlIncludeAttribute(GetT ype(B)), _
System.Xml.Serialization.XmlIncludeAttribute(GetTy pe(C))> _
Public MustInherit Class A
.....
end class
Problem is when i create an instance of class B and serialise it using XmlSerializer, the xsi:type is still missing and this is giving me an error when it comes to submitting the generated XML file as a request to a webservice.I want it to show <A xsi:type="B">
Can someone please guide me in the right direction or point out to me what im doing wrong?
Your help would be greatly appreciated
Thanks