Hi Could someone please help me figure out how to do xml serialization of a custom collection derived from CollectionBase? I have gotten this to work for ArrayList, but would much rather have my own custom collection.
e.g. [XmlRoot( "Foo", Namespace="http://www.foo.com", IsNullable = false) ] class Foo { private Foobars foobars = new Foobars(); [XmlArrayItem( ElementName="Foobar", Type=typeof(Foobar) )] public Foobars Foobars { get{ return this.foobars; } } } class Foobars : CollectionBase {} [XmlRoot( "Foobar", Namespace="http://www.foo.com", ElementName="Foobar", IsNulllable = false) ] class Foobar { public int i; public short s; } When try to create an instance of the XmlSerializer, i am getting an InvalidOperationException : There was an error reflecting Foo. Here is the code for that: XmlSerializer s = new XmlSerializer( typeof( Foo ) ); Thanks in advance for the help. :) Jeff You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
