次の方法で共有


XmlSchemaObjectCollection.Insert メソッド

XmlSchemaObjectXmlSchemaObjectCollection に挿入します。

Public Sub Insert( _
   ByVal index As Integer, _   ByVal item As XmlSchemaObject _)
[C#]
public void Insert(intindex,XmlSchemaObjectitem);
[C++]
public: void Insert(intindex,XmlSchemaObject* item);
[JScript]
public function Insert(
   index : int,item : XmlSchemaObject);

パラメータ

  • index
    項目を挿入する位置の、0 から始まるインデックス番号。
  • item
    挿入する XmlSchemaObject

例外

例外の種類 条件
ArgumentOutOfRangeException index が 0 未満です。

または

index が Count より大きい値です。

解説

Count が既に容量に等しい場合には、新しい要素を挿入する前に、内部配列を自動的に再割り当てすることによって、リストの容量が 2 倍になります。

index と Count が等しい場合は、value が XmlSchemaObjectCollection の末尾に追加されます。新しい要素を挿入するために、挿入箇所より後にある要素の位置が繰り下げられます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

XmlSchemaObjectCollection クラス | XmlSchemaObjectCollection メンバ | System.Xml.Schema 名前空間