このメソッドは、 ServiceDescriptionFormatExtensionCollection 内で、指定した名前と名前空間の URI を持つメンバを検索します。
Overloads Public Function Find( _
ByVal name As String, _ ByVal ns As String _) As XmlElement
[C#]
public XmlElement Find(stringname,stringns);
[C++]
public: XmlElement* Find(String* name,String* ns);
[JScript]
public function Find(
name : String,ns : String) : XmlElement;
パラメータ
- name
検索される XmlElement の名前。 - ns
検索される XmlElement の XML 名前空間の URI。
戻り値
検索が成功した場合は XmlElement 。それ以外の場合は null 参照 (Visual Basic では Nothing) 。
解説
このメソッドは、コレクションをインデックス順に検索し、2 つのパラメータの基準を満たす最初の XmlElement を返します。
使用例
' 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
[C#]
// 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());
}
[C++]
// Check element of type 'SoapAddressBinding' in collection.
Object* myObj = myCollection->Find(mySoapAddressBinding->GetType());
if (myObj == 0)
Console::WriteLine(S"Element of type ' {0}' not found in collection.",
mySoapAddressBinding->GetType());
else
Console::WriteLine(S"Element of type ' {0}' found in collection.",
mySoapAddressBinding->GetType());
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ServiceDescriptionFormatExtensionCollection クラス | ServiceDescriptionFormatExtensionCollection メンバ | System.Web.Services.Description 名前空間 | ServiceDescriptionFormatExtensionCollection.Find オーバーロードの一覧