If the schema for your DataSet contains elements of the same name, but different type, in the same namespace, an exception is thrown when you attempt to read the schema into the DataSet with ReadXmlSchema. This exception does not occur if you are using .NET Framework version 1.0.
// Create the DataSet to read the schema into.
DataSet thisDataSet = new DataSet();
// Set the file path and name. Modify this for your purposes. string filename="Schema.xml";
// Invoke the ReadXmlSchema method with the file name.