ServiceDescriptionCollection.Remove(ServiceDescription) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the first occurrence of the specified ServiceDescription from the collection.
public:
void Remove(System::Web::Services::Description::ServiceDescription ^ serviceDescription);
public void Remove (System.Web.Services.Description.ServiceDescription serviceDescription);
member this.Remove : System.Web.Services.Description.ServiceDescription -> unit
Public Sub Remove (serviceDescription As ServiceDescription)
Parameters
- serviceDescription
- ServiceDescription
The ServiceDescription to remove from the collection.
Examples
// Get the index of 'ServiceDescription' object.
int myIndex = myCollection.IndexOf(myServiceDescription2);
// Remove 'ServiceDescription' object from the collection.
myCollection.Remove(myServiceDescription2);
Console.WriteLine("Element at index {0} is removed ", myIndex);
' Get the index of 'ServiceDescription' object.
Dim myIndex As Integer = myCollection.IndexOf(myServiceDescription2)
' Remove 'ServiceDescription' object from the collection.
myCollection.Remove(myServiceDescription2)
Console.WriteLine("Element at index {0} is removed ", myIndex.ToString())
Remarks
This method performs a linear search; therefore, the average execution time is proportional to Count.
The elements that follow the removed ServiceDescription move up to occupy the vacated spot.
Applies to
Dolgozzon együtt velünk a GitHubon
A tartalom forrása a GitHubon található, ahol létrehozhat és áttekinthet problémákat és lekéréses kérelmeket is. További információért tekintse meg a közreműködői útmutatónkat.