/ Published in: C#
Checks for can XML Deserialize file.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static bool CanXmlDeserialize<T>(string filename) { bool result = false; try { XmlReader reader = XmlReader.Create(filename); result = serializer.CanDeserialize(reader); reader.Close(); } catch { result = false; } return result; }