Bahasa

OperationCollection.Remove(Operation) Metode

Definisi

Menghapus kemunculan pertama dari yang ditentukan Operation dari OperationCollection.

public:
 void Remove(System::Web::Services::Description::Operation ^ operation);
public void Remove(System.Web.Services.Description.Operation operation);
member this.Remove : System.Web.Services.Description.Operation -> unit
Public Sub Remove (operation As Operation)

Parameter

operation
Operation

untuk Operation menghapus dari koleksi.

Contoh

Contoh berikut menunjukkan penggunaan Remove metode .

myOperationCollection->Remove( myOperation );

// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection->Insert( 0, myOperation );
Console::WriteLine( "The operation at index '0' is : {0}", myOperationCollection[ 0 ]->Name );
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);
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)

Keterangan

Metode ini melakukan pencarian linier; oleh karena itu, waktu eksekusi rata-rata sebanding dengan Count.

Elemen yang mengikuti pemindahan yang dihapus Operation ke atas untuk menempati tempat yang dikosokkan.

Berlaku untuk