Language

ServiceDescriptionFormatExtensionCollection.IndexOf(Object) メソッド

定義

指定した ServiceDescriptionFormatExtension を検索し、コレクションを持つ最初のインスタンスの 0 から始まるインデックスを返します。

public:
 int IndexOf(System::Object ^ extension);
public int IndexOf(object extension);
member this.IndexOf : obj -> int
Public Function IndexOf (extension As Object) As Integer

パラメーター

extension
Object

コレクション内で検索する ServiceDescriptionFormatExtension 。

返品

指定した ServiceDescriptionFormatExtensionの 0 から始まるインデックス。コレクション内に要素が見つからなかった場合は -1。

例

// Get index of a 'myFormatExtension' object in collection.
Console::WriteLine( "Index of 'myFormatExtensionObject' is {0} in collection.", myCollection->IndexOf( myFormatExtensionObject ) );
// Get index of a 'myFormatExtension' object in collection.
Console.WriteLine("Index of 'myFormatExtensionObject' is "+
   "{0} in collection.",
   myCollection.IndexOf(myFormatExtensionObject).ToString());
' Get index of a 'myFormatExtension' object in collection.
Console.WriteLine("Index of 'myFormatExtensionObject' is " + _
     "{0} in collection.", myCollection.IndexOf(myFormatExtensionObject).ToString())

適用対象