Compiles the XML Schema definition language (XSD) schemas added to the System.Xml.Schema.XmlSchemaSet into one logical schema.
This method is called automatically when validation is needed and the System.Xml.Schema.XmlSchemaSet has not been previously compiled—for example, when an System.Xml.Schema.XmlSchemaSet is used as an input to create an System.Xml.XmlReader object in the erload:System.Xml.Schema.XmlSchemaSet.Schemas property of an System.Xml.XmlReaderSettings object. If the System.Xml.Schema.XmlSchemaSet is already in the compiled state, this method will not recompile the schemas. If this method executes successfully, the XmlSchemaSet.IsCompiled property is set to true.
Schemas that have been previously compiled by an System.Xml.Schema.XmlSchemaSet are not recompiled. However, schemas that were compiled using the XmlSchemaCollection.Compile method of the System.Xml.Schema.XmlSchemaCollection and the XmlSchema.Compile of the System.Xml.Schema.XmlSchema will be recompiled.
You need to call the XmlSchemaSet.Reprocess(XmlSchema) method if you have changed a schema (or one of its includes/imports) after adding it to the System.Xml.Schema.XmlSchemaSet. The XmlSchemaSet.Reprocess(XmlSchema) method will check the schema for structural validity according to the rules of W3C XML Schema. However, it will not perform a full validation check. It will also resolve references to internal and external schema components. Any imported or included schemas that are successfully retrieved are also added to the System.Xml.Schema.XmlSchemaSet. Imported schemas are added as separate System.Xml.Schema.XmlSchema objects while included schemas are made part of the including System.Xml.Schema.XmlSchema. If the call to reprocess is successful, the XmlSchemaSet.IsCompiled property is set to false.