Add()

XmlSchemaObjectCollection::Add(const SharedPtr<XmlSchemaObject>&) method

Adds an XmlSchemaObject to the XmlSchemaObjectCollection.

int32_t System::Xml::Schema::XmlSchemaObjectCollection::Add(const SharedPtr<XmlSchemaObject> &item)

Arguments

ParameterTypeDescription
itemconst SharedPtr<XmlSchemaObject>&The XmlSchemaObject.

Return Value

The index at which the item has been added.

Exceptions

ExceptionDescription
ArgumentOutOfRangeExceptionindex is less than zero. or index is greater than get_Count value.
InvalidCastExceptionThe XmlSchemaObject parameter specified is not of type XmlSchemaExternal or its derived types XmlSchemaImport, XmlSchemaInclude, and XmlSchemaRedefine.

See Also