ServiceDescriptionFormatExtensionCollection.Find メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ServiceDescriptionFormatExtensionCollectionを検索し、渡されたパラメーターで指定されたコレクションの最初のメンバーを返します。
オーバーロード
| Name | 説明 |
|---|---|
| Find(Type) |
ServiceDescriptionFormatExtensionCollectionを検索し、指定した派生Typeの最初の要素を返します。 |
| Find(String, String) |
指定した名前と名前空間 URI を持つメンバーの ServiceDescriptionFormatExtensionCollection を検索します。 |
Find(Type)
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のオブジェクト。それ以外の場合は null。
注釈
このメソッドは、インデックスの順序でコレクションを検索し、番号が最も小さいインデックスを持つ一致する要素のみを返します。
適用対象
Find(String, String)
指定した名前と名前空間 URI を持つメンバーの ServiceDescriptionFormatExtensionCollection を検索します。
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 を返します。