CodeDirectiveCollection.IndexOf メソッド
アセンブリ: System (system.dll 内)

Dim instance As CodeDirectiveCollection Dim value As CodeDirective Dim returnValue As Integer returnValue = instance.IndexOf(value)
戻り値
見つかった場合はコレクション内での指定したオブジェクトのインデックス位置。それ以外の場合は -1。

IndexOf メソッドを使用して、コレクション内での指定した CodeDirective オブジェクトのインデックスを取得する方法を次のコード例に示します。このコード例は、CodeDirectiveCollection クラスのトピックで取り上げているコード例の一部分です。
' Tests for the presence of a CodeDirective in the ' collection, and retrieves its index if it is found. Dim testDirective = New CodeRegionDirective(CodeRegionMode.Start, "Region1") Dim itemIndex As Integer = -1 If collection.Contains(testDirective) Then itemIndex = collection.IndexOf(testDirective)
// Tests for the presence of a CodeDirective in the // collection, and retrieves its index if it is found. CodeDirective testDirective = new CodeRegionDirective(CodeRegionMode.Start, "Region1"); int itemIndex = -1; if (collection.Contains(testDirective)) itemIndex = collection.IndexOf(testDirective);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からCodeDirectiveCollection.IndexOf メソッドを検索する場合は、下記のリンクをクリックしてください。

- CodeDirectiveCollection.IndexOf メソッドのページへのリンク