Adds the System.Xml.Schema.XmlSchema to the collection.
The XmlSchema object.
The targetNamespace attribute is used to identify this schema.
If the schema being added contains references to other namespaces (through include and import elements), the trust level of the application determines how these other namespaces are resolved. (In the .NET Framework version 1.0, a default System.Xml.XmlUrlResolver was always used).
Fully trusted code: A default XmlUrlResolver with no user credentials is used to resolve any external resources. The schemas for these other namespaces are loaded for validation purposes only. Unlike the original schema, these other schemas are not explicitly added to the schema collection. As a result, they are not accessible using any of the collection methods or properties. If these external resources are located on a network resource that requires authentication, use an overload that takes an System.Xml.XmlResolver as one of its arguments and specify an XmlResolver with the necessary credentials.
Semi-trusted code: External references are not resolved.
If the XmlSchemaCollection is being accessed using the System.Xml.XmlValidatingReader.Schemas property, the Add method uses the XmlResolver specified by the System.Xml.XmlValidatingReader.XmlResolver property.
The System.Xml.Schema.XmlSchemaCollection class is obsolete in the .NET Framework version 2.0 and has been replaced by the System.Xml.Schema.XmlSchemaSet class.