OperationCollection.Remove メソッド
OperationCollection から、最初に出現する指定した Operation を削除します。
Public Sub Remove( _
ByVal operation As Operation _)
[C#]
public void Remove(Operationoperation);
[C++]
public: void Remove(Operation* operation);
[JScript]
public function Remove(
operation : Operation);
パラメータ
- operation
コレクションから削除する Operation 。
解説
このメソッドはリニア サーチを実行します。したがって、平均検索時間は Count に比例します。
削除された Operation の後ろにある要素は、前にずれて空白になった場所に移動します。
使用例
[Visual Basic, C#, C++] Remove メソッドを使用する例を次に示します。
myOperationCollection.Remove(myOperation)
' Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation)
Console.WriteLine("The operation at index '0' is : " + _
myOperationCollection.Item(0).Name)
[C#]
myOperationCollection.Remove(myOperation);
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation);
Console.WriteLine("The operation at index '0' is : " +
myOperationCollection[0].Name);
[C++]
myOperationCollection->Remove(myOperation);
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection->Insert(0, myOperation);
Console::WriteLine(S"The operation at index '0' is : {0}", myOperationCollection->Item[0]->Name);
[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 ファミリ
参照
OperationCollection クラス | OperationCollection メンバ | System.Web.Services.Description 名前空間