Click here to Skip to main content
15,886,578 members
Articles / Mobile Apps / Windows Mobile

XML Serialization of Generic Dictionary, Multidimensional Array, and Inherited Type, with sharpSerializer .NET

Rate me:
Please Sign up or sign in to vote.
4.92/5 (48 votes)
9 Nov 2011CPOL8 min read 250.8K   2.9K   122  
How to serialize to XML, any generic, derived, or other complex type, which XMLSerializer cannot serialize
namespace Polenter.Serialization
{
    ///<summary>
    ///  What format has the serialized binary file. It could be SizeOptimized or Burst.
    ///</summary>
    public enum BinarySerializationMode
    {
        /// <summary>
        ///   All types are serialized to string lists, which are stored in the file header. Duplicates are removed. Serialized objects only reference these types. It reduces size especially if serializing collections. Refer to SizeOptimizedBinaryWriter for more details.
        /// </summary>
        SizeOptimized = 0,
        /// <summary>
        ///   There are as many type definitions as many objects stored, not regarding if there are duplicate types defined. It reduces the overhead if storing single items, but increases the file size if storing collections. See BurstBinaryWriter for details.
        /// </summary>
        Burst
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Polenter - Software Solutions
Germany Germany
I'm C# developer from Cologne, Germany. Here I owe a small software company. My hobby is general optimization - natural talent of all lazy people Wink | ;-)

Comments and Discussions