OutOfMemoryError calling XmlSerializer.Deserialize() - not related to XML size!
- by Mike Atlas
This is a really crazy bug. The following is throwing an OutOfMemoryException, for XML snippits that are very short (e.g., <ABC def='123'/>) of one type, but not for others of the same size but a different type: (e.g., <ZYX qpr='baz'/>).
public static T DeserializeXmlNode<T>(XmlNode node)
{
try
{
return (T)new…