指定した ServiceDescriptionFormatExtension を検索し、コレクション内の最初のインスタンスの 0 から始まるインデックス番号を返します。
Public Function IndexOf( _
ByVal extension As Object _) As Integer
[C#]
public int IndexOf(objectextension);
[C++]
public: int IndexOf(Object* extension);
[JScript]
public function IndexOf(
extension : Object) : int;
パラメータ
- extension
コレクション内での検索対象となる ServiceDescriptionFormatExtension 。
戻り値
32 ビット符号付き整数。
使用例
' Get index of a 'myFormatExtension' object in collection.
Console.WriteLine("Index of 'myFormatExtensionObject' is " + _
"{0} in collection.", myCollection.IndexOf(myFormatExtensionObject).ToString())
[C#]
// Get index of a 'myFormatExtension' object in collection.
Console.WriteLine("Index of 'myFormatExtensionObject' is "+
"{0} in collection.",
myCollection.IndexOf(myFormatExtensionObject).ToString());
[C++]
// Get index of a 'myFormatExtension' object in collection.
Console::WriteLine(S"Index of 'myFormatExtensionObject' is {0} in collection.",
__box(myCollection->IndexOf(myFormatExtensionObject)));
[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 名前空間