System.Xml.Schema.XmlSchemaSet.Add Method

Adds the given System.Xml.Schema.XmlSchema to the System.Xml.Schema.XmlSchemaSet.

Syntax

public XmlSchema Add (XmlSchema schema)

Parameters

schema
The System.Xml.Schema.XmlSchema object to add to the System.Xml.Schema.XmlSchemaSet.

Returns

An System.Xml.Schema.XmlSchema object if the schema is valid. If the schema is not valid and a System.Xml.Schema.ValidationEventHandler is specified, then null is returned and the appropriate validation event is raised. Otherwise, an System.Xml.Schema.XmlSchemaException is thrown.

Remarks

If the System.Xml.Schema.XmlSchema object already exists in the System.Xml.Schema.XmlSchemaSet, the XmlSchemaSet.Add(XmlSchema) method does nothing.

The functionality of this method is identical to that of the XmlSchemaSet.Add(string, string) method.

Requirements

Namespace: System.Xml.Schema
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0