ServiceDescriptionFormatExtensionCollection::Find Method (String^, String^)

 

Searches the ServiceDescriptionFormatExtensionCollection for a member with the specified name and namespace URI.

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

public:
XmlElement^ Find(
	String^ name,
	String^ ns
)

Parameters

name
Type: System::String^

The name of the XmlElement to be found.

ns
Type: System::String^

The XML namespace URI of the XmlElement to be found.

Return Value

Type: System.Xml::XmlElement^

If the search is successful, an XmlElement; otherwise, null.

This method searches the collection in index order, and returns the first XmlElement that meets the criteria of the two parameters.

// Check element of type 'SoapAddressBinding' in collection.
Object^ myObj = myCollection->Find( mySoapAddressBinding->GetType() );
if ( myObj == nullptr )
      Console::WriteLine( "Element of type ' {0}' not found in collection.", mySoapAddressBinding->GetType() );
else
      Console::WriteLine( "Element of type ' {0}' found in collection.", mySoapAddressBinding->GetType() );

.NET Framework
Available since 1.1
Return to top
Show: