Locations of visitors to this page
    Sprouting Synapses       Minimize  

             
            Minimize  
Author: SkySigal Created: 8/21/2008 1:20 AM
A group of posts about Serialization/Deserialization using the BinaryFormatter, SoapFormatter, etc.

By SkySigal on 8/22/2008 1:24 AM

blog_csharp_serialization Just parking the link to a serialization option that might interest some: http://csharpcookbook.tar.hu/csharpckbk-chp-3-sect-33.html

What he's done here is provide a wrapper to the 3 main formatting mechanisms.

Its an interesting route...although I generally prefer being a little closer to the process, with a little more control...

But to each his own, right?

powered by metaPost

By SkySigal on 8/21/2008 11:26 PM

imageThe XmlSerializer is often discussed in the same breath as the SoapFormatter, even when they are totally different serialization systems with no common inheritance or interfaces.

Not knowing the differences between the two can lead to problems.

Below is comprehensive demonstration on how to use the XmlSerializer effectively...

Read More »

By SkySigal on 8/21/2008 6:58 PM

blog_csharp_serialization At first glance, the XmlSerializer and SoapFormatter appear to both do basically the same thing.

This is certainly not the case.

In order to choose the right one, read on.

Read More »

By SkySigal on 8/21/2008 3:42 PM

image There seems to be some overlap: the NotSerializedAttribute works for all types of serialization (except custom where its bypassed), so why does one need to use the NotSerializedAttribute?

 

Secondly, I always see the MSDN documentation say that public properties are serialized, but both the Binary and Soap versions don't - they just serialize the fields behind the properties. Which is what I want  in any case -- I'm just surprised (and wary) that I've never seen what the documentation says.

powered by metaPost

By SkySigal on 8/21/2008 3:27 PM

 

image Using XmlSerializer to serialize System ValueTypes (bool, int, string, etc.) is fundamentally easy.

What can stump you is how to serialize custom classes -- or better yet, arrays that contain custom classes, when you don't have access to the base classes and therefore can't work with XmlInclude.

Here's how to make it work -- easily.

Read More »

By SkySigal on 8/21/2008 3:21 PM

image This is a keeper as its just about the most succinct and good summary I've seen yet on one of the functions of the XmlInclude attribute:

http://www.pluralsight.com/community/blogs/craig/archive/2004/07/08/1580.aspx

 

 

Links:

powered by metaPost

By SkySigal on 8/21/2008 2:38 AM

blog_csharp_serializationHere is a crash course that covers all the essentials of using the Binary and Soap formatters.

 

Read More »


             
Copyright 2007 by Sky Sigal