.xsd and serialization

I managed to create automatically (with xsd.exe help) few classes by 3 different xsd files (schemas).
I compiled them and loaded the DLL file to my vl project.
Then I tried to serialize (default system serilizer) the generated classes but it didn’t work out of the box (even if they had the attributes clarified before each property []).
What is the proper way to serialize them?

Is it better to define a return method in the cs files rather than trying work around in gamma?

i think you have to use the XmlSerializer Class (System.Xml.Serialization) | Microsoft Learn for that to work.

thanks @tonfilm I ll definitely have a look. Is it needful to register the serializer in VL afterwards ?

no, you don’t need to do anything with VL, you just use the XmlSerializer to serialize and deserialize your classes. it is basically part of your application.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.