ServiceDescriptionCollection.Contains Method (ServiceDescription)
.NET Framework (current version)
Returns a value indicating whether the specified ServiceDescription is a member of the collection.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- serviceDescription
-
Type:
System.Web.Services.Description.ServiceDescription
The ServiceDescription for which to check collection membership.
Return Value
Type: System.Booleantrue if the serviceDescription parameter is a member of the ServiceDescriptionCollection; otherwise, false.
' Check for 'ServiceDescription' object in the collection. If myCollection.Contains(myServiceDescription2) Then ' 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()) Else Console.WriteLine("Element not found.") End If
.NET Framework
Available since 1.1
Available since 1.1
Show: