Pages

Tuesday, March 15, 2011

C# - XML Serialization of Class

Always useful!!! For whatever reason, it's always good to know how to serialize your class into a file, or any other kind of Stream. This example has one simple class with two properties, but it could be a global variable either, and the XmlSerializer usage.





















The result file of this example, looks like this:







Besides this, the serialization is not complete with the deserialization :) That's pretty simple to!








References:
http://support.microsoft.com/kb/815813/en-us

No comments:

Post a Comment