1
Vote

Support generic types in an XML serializer

description

Let's say I have a function that deserializes using a generic type like this
 
public T ConvertXml<T>(string xml)
{
var serializer = new XmlSerializer(typeof(T));
return (T)serializer.Deserialize(new StringReader(xml));
}
 
code taken from this answer http://stackoverflow.com/a/2670205/100988

comments