CodeTypeDeclarationCollection.IndexOf メソッド
アセンブリ: System (system.dll 内)
 構文
構文Dim instance As CodeTypeDeclarationCollection Dim value As CodeTypeDeclaration Dim returnValue As Integer returnValue = instance.IndexOf(value)
戻り値
見つかった場合はコレクション内での指定したオブジェクトのインデックス。それ以外の場合は -1。
 使用例
使用例' Tests for the presence of a CodeTypeDeclaration in the ' collection, and retrieves its index if it is found. Dim testDeclaration As New CodeTypeDeclaration("TestType") Dim itemIndex As Integer = -1 If collection.Contains(testDeclaration) Then itemIndex = collection.IndexOf(testDeclaration) End If
// Tests for the presence of a CodeTypeDeclaration in the // collection, and retrieves its index if it is found. CodeTypeDeclaration testDeclaration = new CodeTypeDeclaration("TestType"); int itemIndex = -1; if( collection.Contains( testDeclaration ) ) itemIndex = collection.IndexOf( testDeclaration );
// Tests for the presence of a CodeTypeDeclaration in the // collection, and retrieves its index if it is found. CodeTypeDeclaration^ testDeclaration = gcnew CodeTypeDeclaration( "TestType" ); int itemIndex = -1; if ( collection->Contains( testDeclaration ) ) itemIndex = collection->IndexOf( testDeclaration );
// Tests for the presence of a CodeTypeDeclaration in the // collection, and retrieves its index if it is found. CodeTypeDeclaration testDeclaration = new CodeTypeDeclaration("TestType"); int itemIndex = -1; if (collection.Contains(testDeclaration)) { itemIndex = collection.IndexOf(testDeclaration); }
 プラットフォーム
プラットフォーム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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
 バージョン情報
バージョン情報 参照
参照- CodeTypeDeclarationCollection.IndexOf メソッドのページへのリンク

 
                             
                    


