ServiceDescriptionFormatExtensionCollection.Insert(Int32, Object) メソッド

定義

指定した 0 から始まるインデックス位置にあるServiceDescriptionFormatExtensionに、指定したServiceDescriptionFormatExtensionCollectionを追加します。

public:
 void Insert(int index, System::Object ^ extension);
public void Insert(int index, object extension);
member this.Insert : int * obj -> unit
Public Sub Insert (index As Integer, extension As Object)

パラメーター

index
Int32

extension パラメーターを挿入する位置の 0 から始まるインデックス。

extension
Object

コレクションに追加する ServiceDescriptionFormatExtension

例外

index パラメーターが 0 未満です。

-又は-

index パラメーターが Count より大きい。

// Insert 'MyFormatExtension' object.
myCollection->Insert( 0, myFormatExtensionObject );
Console::WriteLine( "'myFormatExtensionObject' is inserted to collection." );
// Insert 'MyFormatExtension' object.
myCollection.Insert(0,myFormatExtensionObject);
Console.WriteLine("'myFormatExtensionObject' is inserted to collection.");
' Insert 'MyFormatExtension' object.
myCollection.Insert(0, myFormatExtensionObject)
Console.WriteLine("'myFormatExtensionObject' is inserted to collection.")

注釈

コレクション内の項目の数が既にコレクションの容量と等しい場合、新しい要素が挿入される前に内部配列を自動的に再割り当てすることで、容量が 2 倍になります。

index パラメーターが Count と等しい場合、extension パラメーターはServiceDescriptionFormatExtensionCollectionの末尾に追加されます。

挿入ポイントの後の要素は、新しい要素に合わせて下に移動します。

適用対象