Share via


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

戻り値

Int32

指定した 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())

適用対象