ServiceDescriptionFormatExtensionCollection.Contains Method (Object)

 

Returns a value indicating whether the specified ServiceDescriptionFormatExtension is a member of the ServiceDescriptionFormatExtensionCollection.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

Public Function Contains (
	extension As Object
) As Boolean

Parameters

extension
Type: System.Object

The ServiceDescriptionFormatExtension for which to check collection membership.

Return Value

Type: System.Boolean

true if the ServiceDescriptionFormatExtension is a member of the collection; otherwise, false.

' Check for 'myFormatExtension' object in collection.
If myCollection.Contains(myFormatExtensionObject) Then
   ' Get index of a 'myFormatExtension' object in collection.
   Console.WriteLine("Index of 'myFormatExtensionObject' is " + _
        "{0} in collection.", myCollection.IndexOf(myFormatExtensionObject).ToString())
   ' Remove 'myFormatExtensionObject' element from collection.
   myCollection.Remove(myFormatExtensionObject)
   Console.WriteLine("'myFormatExtensionObject' is removed" + _
        " from collection.")
End If

.NET Framework
Available since 1.1
Return to top
Show: