serialize list of generic type
问题 I am writing an application for serialization of a generic List that holds any datatype.So I designed a base-DataType to fill the list with as follows: public abstract class GenericObject<T> { public string key; public T value; public GenericObject() { } public GenericObject(string key, T value) : this() { this.key = key; this.value = value; } } Furthermore there is a class GenericList which implements the IXmlSerializable -Interface to write a key-value pair as like this: GenericObject<int>