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 Function Find (
	name As String,
	ns As String
) As XmlElement

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.
Dim myObj As Object = myCollection.Find(mySoapAddressBinding.GetType())
If myObj Is Nothing Then
   Console.WriteLine("Element of type '{0}' not found in collection.", _
        mySoapAddressBinding.GetType().ToString())
Else
   Console.WriteLine("Element of type '{0}' found in collection.", _
        mySoapAddressBinding.GetType().ToString())
End If

.NET Framework
Available since 1.1
Return to top
Show: