ServiceDescriptionCollection.IndexOf(ServiceDescription) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した ServiceDescription を検索し、コレクション内で最初に見つかった位置の 0 から始まるインデックスを返します。
public:
int IndexOf(System::Web::Services::Description::ServiceDescription ^ serviceDescription);
public int IndexOf(System.Web.Services.Description.ServiceDescription serviceDescription);
member this.IndexOf : System.Web.Services.Description.ServiceDescription -> int
Public Function IndexOf (serviceDescription As ServiceDescription) As Integer
パラメーター
- serviceDescription
- ServiceDescription
コレクション内で検索する ServiceDescription 。
返品
指定したサービスの説明の 0 から始まるインデックス。要素がコレクション内に見つからなかった場合は -1。
例
// Get the index of 'ServiceDescription' object.
int myIndex = myCollection.IndexOf(myServiceDescription2);
// Remove 'ServiceDescription' object from the collection.
myCollection.Remove(myServiceDescription2);
Console.WriteLine("Element at index {0} is removed ", myIndex);
' Get the index of 'ServiceDescription' object.
Dim myIndex As Integer = myCollection.IndexOf(myServiceDescription2)
' Remove 'ServiceDescription' object from the collection.
myCollection.Remove(myServiceDescription2)
Console.WriteLine("Element at index {0} is removed ", myIndex.ToString())