[C#] SOAP Format Serialization/Deserialization - Class Object - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19) +---- Thread: [C#] SOAP Format Serialization/Deserialization - Class Object (/showthread.php?tid=27140) |
[C#] SOAP Format Serialization/Deserialization - Class Object - AceInfinity - 09-22-2012 Here's an example of serialization I've put together. What this allows you to do is to retrieve data from a file and save class object data to that file for later use. You'll notice the serializable object we have, is our TLFUser class marked with the Serializable attribute, so that we can serialize this object using the SOAP format. Before you begin, you'll need to add these to the top of your code for references: Code: using System.Runtime.Serialization; And you'll also need to manually add the reference for System.Runtime.Serialization.Formatters.Soap. Here's the data we want to serialize: Code: [Serializable] And here's our method: Code: private void MainMethod() You should be able to see how this can come in useful, otherwise ask your questions RE: [C#] SOAP Format Serialization/Deserialization - Class Object - ƃu∀ ıʞƃu∀ - 11-25-2012 nice share mate very useful |