The setup:
class Item
{
private int _value;
public Item()
{
_value = 0;
}
public int Value { get { return _value; } set { _valu
This behavior is "By Design". When deriving from a collection class the Xml Seralizier will only serialize the collection elements. To work around this you should create a class that encapsulates the collection and the name and have that serialized.
class Wrapper
{
private Collection- _items;
private string _name;
public Collection
- Items { get {return _items; } set { _items = value; } }
public string Name { get { return _name; } set { _name = value; } }
}
A detailed discussion is available here: http://blogs.vertigo.com/personal/chris/Blog/archive/2008/02/01/xml-serializing-a-derived-collection.aspx