Sample code on XML and soap serialization

Serialization is a process by which you can save an object in the form of a file or in a database or in the memory to be used later. Serialization can be done in different ways.

_______________________________________________


_______________________________________________

One is Binary serialization, the other is XML serialization, and the final one is the SOAP serialization. All these types of serialization are supported in .Net.

With the XML serialization you can serialize all the public properties and fields. The private members cannot be serialized. Other types of serialization should be used if you want to serialize the private members.

With this type of serialization only the class that does not implement IDictionary can be serialized. The IsNullable attribute is to be set to true if you want to serialize the Null values. MemoryStream is used if you want to store the object in the memory.

SOAP and Binary serialization can be used to serialize the private fields. If you do not want to serialize an object then you have to use the attribute [NonSerialized]. You can mark the class as serializable with the [Serializable] attribute.

Serializable attribute cannot be inherited from the parent class. Make all the members serialization to serialize a class. Classes that implement IDictionary can be serialized with the SOAP and Binary serialization.

Lot of code samples is available in the internet for serialization and deserialization.

SchoolCenter Selected as Finalist in 25th Annual CODiE Awards (redOrbit)
CARBONDALE, Ill., March 9 /PRNewswire/ -- SchoolCenter, the leader in strategic K-12 web solutions, announced today that they are a finalist in the 2010 CODiE Awards, presented by the Software & Information Industry Association (SIIA). SchoolCenter's SC Pro made the prestigious CODiE cut in the "Best Web Services Solution" category.

SchoolCenter Selected as Finalist in 25th Annual CODiE Awards (PR Newswire via Yahoo! Finance)
CARBONDALE, Ill. , March 9 /PRNewswire/ -- SchoolCenter, the leader in strategic K-12 web solutions, announced today that they are a finalist in the 2010 CODiE Awards, presented by the Software & Information Industry Association (SIIA). SchoolCenter's SC Pro made the prestigious CODiE cut in the "Best Web Services Solution" category. The category awards the solution that best connects disparate ...



FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________

Recommended XML Books

cover
cover
cover
cover
cover
cover


 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!


New XML Books Titles - Best Seller's @ Amazon.com

Visit XML Training Material Guide Homepage

Technology helps engage students - how do classroom instruction and social dynamics change when the classroom is completely dependant on modern technology?

Cisco CCNA Certification Video Tutorial Guide - Learn How to Pass the Cisco CCNA 640-802 Exam... Guaranteed!

Train Signal Computer Training