ServiceDescriptionFormatExtensionCollection.IndexOf(Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
搜尋指定的 ServiceDescriptionFormatExtension,並傳回集合中第一個執行個體之以零起始的索引。
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 的以零起始的索引;如果在集合中找不到此項目,則為 -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())