ServiceDescriptionFormatExtensionCollection.Find Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Searches the ServiceDescriptionFormatExtensionCollection and returns the first member of the collection specified by the parameter passed in.
Find(Type) |
Searches the ServiceDescriptionFormatExtensionCollection and returns the first element of the specified derived Type. |
Find(String, String) |
Searches the ServiceDescriptionFormatExtensionCollection for a member with the specified name and namespace URI. |
Searches the ServiceDescriptionFormatExtensionCollection and returns the first element of the specified derived Type.
public:
System::Object ^ Find(Type ^ type);
public object Find(Type type);
member this.Find : Type -> obj
Public Function Find (type As Type) As Object
Parameters
Returns
If the search is successful, an object of the specified Type; otherwise, null
.
Remarks
This method searches the collection in index order, and returns only the matching element with the lowest-numbered index.
Applies to
.NET Framework 4.8.1 и друге верзије
Производ | Верзије |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Searches the ServiceDescriptionFormatExtensionCollection for a member with the specified name and namespace URI.
public:
System::Xml::XmlElement ^ Find(System::String ^ name, System::String ^ ns);
public System.Xml.XmlElement Find(string name, string ns);
member this.Find : string * string -> System.Xml.XmlElement
Public Function Find (name As String, ns As String) As XmlElement
Parameters
- name
- String
The name of the XmlElement to be found.
- ns
- String
The XML namespace URI of the XmlElement to be found.
Returns
If the search is successful, an XmlElement; otherwise, null
.
Examples
// 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() );
// Check element of type 'SoapAddressBinding' in collection.
Object myObj = myCollection.Find(mySoapAddressBinding.GetType());
if(myObj == null)
{
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());
}
' 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
Remarks
This method searches the collection in index order, and returns the first XmlElement that meets the criteria of the two parameters.
Applies to
.NET Framework 4.8.1 и друге верзије
Производ | Верзије |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
.NET повратне информације
.NET је пројекат отвореног кода. Изаберите везу да бисте обезбедили повратне информације: