Extensions are confusing

This commit is contained in:
Matt Nadareski
2016-04-19 13:11:11 -07:00
parent 20aee2ffae
commit 788bf2d794
3 changed files with 17 additions and 3 deletions

View File

@@ -292,5 +292,19 @@ namespace SabreTools.Helper
return (norename ? String.Compare(x.Game, y.Game) : x.SystemID - y.SystemID);
});
}
public static bool IsXmlDat(string filename)
{
XmlDocument doc = new XmlDocument();
try
{
doc.LoadXml(File.ReadAllText(filename));
}
catch (XmlException)
{
return false;
}
return true;
}
}
}