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:
bool Contains(
	Object^ extension
)

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 ) )
{
   // Get index of a 'myFormatExtension' object in collection.
   Console::WriteLine( "Index of 'myFormatExtensionObject' is {0} in collection.", myCollection->IndexOf( myFormatExtensionObject ) );

   // Remove 'myFormatExtensionObject' element from collection.
   myCollection->Remove( myFormatExtensionObject );
   Console::WriteLine( "'myFormatExtensionObject' is removed  from collection." );
}

.NET Framework
Available since 1.1
Return to top
Show: