Click here to Skip to main content
15,884,836 members
Articles / Desktop Programming / Windows Forms

Serialize and Deserialize IEnumerable Objects

Rate me:
Please Sign up or sign in to vote.
4.68/5 (29 votes)
11 Dec 2006CPOL10 min read 391.7K   2.4K   127  
CustomXmlSerializer is an alternative to XmlSerializer, supporting both shallow and deep serialization of ArrayLists, Collections, and Dictionaries.
namespace CSharp_CustomXmlSerializer_Demo.Profile
{
	public class Questions:System.Collections.CollectionBase
	{
		public void Add(Question value)
		{
			base.List.Add(value);
		}


		public Question this[int index]
		{
			get	{return (Question) base.List[index];}
		}


		public Question this[string identifier]
		{
			get
			{
				foreach (Question _Item in this)
					if (string.Compare(_Item.Identifier.ToString(), identifier, true) == 0)
						return _Item;

				return  null;
			}
		}
	}
}

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
Web Developer
United States United States
Larry Steinle is a systems analyst for HDR, Inc, a nationally recognized architecture, engineering, and consulting firm. He graduated with a certificate in Biblical Studies, an Associate in Computer Programming, and a Bachelor Degree in Management Information Systems.

Comments and Discussions