public void verifyXsd(string file)
{
try
{
XmlSchemaSet ss = new XmlSchemaSet();
ss.Add("", file);
ss.Compile(); // if throws StackOfFlowException will cause test failure
}
catch (OutOfMemoryException)
{
// throw OutOfMemoryException is ok since it is catchable.
}
}