How to make XML deserialization faster?
问题 I have the following piece of code public static object XmlDeserialize(string xml, Type objType) { StringReader stream = null; XmlTextReader reader = null; try { XmlSerializer serializer = new XmlSerializer(objType); stream = new StringReader(xml); // Read xml data reader = new XmlTextReader(stream); // Create reader return serializer.Deserialize(reader); } finally { if(stream != null) stream.Close(); if(reader != null) reader.Close(); } } The object itself has been generated via xsd.exe and