指定した 0 から始まるインデックス番号にある OperationMessageCollection に、指定した OperationMessage を追加します。
Public Sub Insert( _
ByVal index As Integer, _ ByVal operationMessage As OperationMessage _)
[C#]
public void Insert(intindex,OperationMessageoperationMessage);
[C++]
public: void Insert(intindex,OperationMessage* operationMessage);
[JScript]
public function Insert(
index : int,operationMessage : OperationMessage);
パラメータ
- index
operationMessage パラメータを挿入する位置の、0 から始まるインデックス番号。 - operationMessage
コレクションに追加する OperationMessage 。
解説
コレクション内の項目数が既にコレクションの許容量に達している場合は、新しい要素が挿入される前に内部配列が自動的に再割り当てされ、コレクションの容量が 2 倍になります。
index パラメータと Count が等しい場合は、 operationMessage パラメータがコレクションの末尾に追加されます。
新しい要素を挿入できるように、挿入位置より後にある要素の位置が繰り下がります。
使用例
myOperationMessageCollection.Remove(myInputOperationMessage)
' Display Flow, Input, and Output after removing.
DisplayFlowInputOutput(myOperationMessageCollection, "Remove")
' Insert the message at index 0 in the collection.
myOperationMessageCollection.Insert(0, myInputOperationMessage)
' Display Flow, Input, and Output after inserting.
DisplayFlowInputOutput(myOperationMessageCollection, "Insert")
[C#]
myOperationMessageCollection.Remove(myInputOperationMessage);
// Display Flow, Input, and Output after removing.
DisplayFlowInputOutput(myOperationMessageCollection, "Remove");
// Insert the message at index 0 in the collection.
myOperationMessageCollection.Insert(0, myInputOperationMessage);
// Display Flow, Input, and Output after inserting.
DisplayFlowInputOutput(myOperationMessageCollection, "Insert");
[C++]
myOperationMessageCollection->Remove(myInputOperationMessage);
// Display Flow, Input, and Output after removing.
DisplayFlowInputOutput(myOperationMessageCollection, S"Remove");
// Insert the message at index 0 in the collection.
myOperationMessageCollection->Insert(0, myInputOperationMessage);
// Display Flow, Input, and Output after inserting.
DisplayFlowInputOutput(myOperationMessageCollection, S"Insert");
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
OperationMessageCollection クラス | OperationMessageCollection メンバ | System.Web.Services.Description 名前空間