Revision: 39441
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 18, 2011 00:36 by jalalx
Initial Code
public static T XmlDeserialize<T>(string filename) { T o = default(T); try { XmlReader reader = XmlReader.Create(filename); XmlSerializer serializer = new XmlSerializer(typeof(T)); if (serializer.CanDeserialize(reader)) { o = (T)serializer.Deserialize(reader); } reader.Close(); } catch { } finally { } return o; }
Initial URL
Initial Description
Deserialize an XML object to an T type.
Initial Title
Xml Deserializer
Initial Tags
xml
Initial Language
C#