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

Dim instance As CodeNamespaceCollection Dim value As CodeNamespace Dim returnValue As Integer returnValue = instance.IndexOf(value)
戻り値
指定した CodeNamespace がコレクション内に存在する場合は、そのインデックス。それ以外の場合は -1。

' Tests for the presence of a CodeNamespace in the collection, ' and retrieves its index if it is found. Dim testNamespace As New CodeNamespace("TestNamespace") Dim itemIndex As Integer = -1 If collection.Contains(testNamespace) Then itemIndex = collection.IndexOf(testNamespace) End If
// Tests for the presence of a CodeNamespace in the collection, // and retrieves its index if it is found. CodeNamespace testNamespace = new CodeNamespace("TestNamespace"); int itemIndex = -1; if( collection.Contains( testNamespace ) ) itemIndex = collection.IndexOf( testNamespace );
// Tests for the presence of a CodeNamespace in the collection, // and retrieves its index if it is found. CodeNamespace^ testNamespace = gcnew CodeNamespace( "TestNamespace" ); int itemIndex = -1; if ( collection->Contains( testNamespace ) ) itemIndex = collection->IndexOf( testNamespace );

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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