Share via


ServiceDescriptionFormatExtensionCollection.Find メソッド

定義

ServiceDescriptionFormatExtensionCollection を検索し、渡されたパラメーターによって指定されたコレクションの最初のメンバーを返します。

オーバーロード

Find(Type)

ServiceDescriptionFormatExtensionCollection を検索し、指定した派生 Type の最初の要素を返します。

Find(String, String)

ServiceDescriptionFormatExtensionCollection 内で、指定した名前と名前空間の URI を持つメンバーを検索します。

Find(Type)

ソース:
ServiceDescription.cs
ソース:
ServiceDescription.cs
ソース:
ServiceDescription.cs

ServiceDescriptionFormatExtensionCollection を検索し、指定した派生 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

パラメーター

type
Type

コレクション内での検索対象となる Type

戻り値

検索が成功した場合は、指定した Type のオブジェクト。それ以外の場合は null

注釈

このメソッドは、インデックス順にコレクションを検索し、番号が最も小さいインデックスを持つ一致する要素のみを返します。

適用対象

Find(String, String)

ソース:
ServiceDescription.cs
ソース:
ServiceDescription.cs
ソース:
ServiceDescription.cs

ServiceDescriptionFormatExtensionCollection 内で、指定した名前と名前空間の 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

パラメーター

name
String

検索される XmlElement の名前。

ns
String

検索される XmlElement の XML 名前空間の URI。

戻り値

検索が成功した場合は XmlElement。それ以外の場合は null

// 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

注釈

このメソッドは、インデックス順にコレクションを検索し、2 つのパラメーターの条件を満たす最初 XmlElement の を返します。

適用対象