ImportCollection.IndexOf メソッド
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文Dim instance As ImportCollection Dim import As Import Dim returnValue As Integer returnValue = instance.IndexOf(import)
戻り値
32 ビット符号付き整数。
使用例' Get Import by Index. Dim myImport As Import = _ myServiceDescription.Imports(myServiceDescription.Imports.Count - 1) Console.WriteLine("Import by Index...") If myImportCollection.Contains(myImport) Then Console.WriteLine("Import Namespace '" + myImport.Namespace + _ "' is found in 'ImportCollection'.") Console.WriteLine("Index of '" + myImport.Namespace + _ "' in 'ImportCollection' = " + _ myImportCollection.IndexOf(myImport).ToString()) Console.WriteLine("Delete Import from 'ImportCollection'...") myImportCollection.Remove(myImport) If myImportCollection.IndexOf(myImport) = - 1 Then Console.WriteLine("Import is successfully removed from Import Collection.") End If
// Get Import by Index. Import myImport = myServiceDescription.Imports[myServiceDescription.Imports.Count-1]; Console.WriteLine("Import by Index..."); if (myImportCollection.Contains(myImport)) { Console.WriteLine("Import Namespace '" + myImport.Namespace + "' is found in 'ImportCollection'."); Console.WriteLine("Index of '" + myImport.Namespace + "' in 'ImportCollection' = " + myImportCollection.IndexOf(myImport)); Console.WriteLine("Deleting Import from 'ImportCollection'..."); myImportCollection.Remove(myImport); if(myImportCollection.IndexOf(myImport) == -1) Console.WriteLine("Import is successfully removed from Import Collection."); }
// Get Import by Index. Import^ myImport = myServiceDescription->Imports[ myServiceDescription->Imports->Count - 1 ]; Console::WriteLine( "Import by Index..." ); if ( myImportCollection->Contains( myImport ) ) { Console::WriteLine( "Import Namespace ' {0} ' is found in 'ImportCollection'.", myImport->Namespace ); Console::WriteLine( "Index of '{0}' in 'ImportCollection' = {1}", myImport->Namespace, myImportCollection->IndexOf( myImport ) ); Console::WriteLine( "Deleting Import from 'ImportCollection'..." ); myImportCollection->Remove( myImport ); if ( myImportCollection->IndexOf( myImport ) == -1 ) Console::WriteLine( "Import is successfully removed from Import Collection." ); }
// Get Import by Index. Import myImport = myServiceDescription.get_Imports(). get_Item(myServiceDescription.get_Imports().get_Count() - 1); Console.WriteLine("Import by Index..."); if (myImportCollection.Contains(myImport)) { Console.WriteLine("Import Namespace '" + myImport.get_Namespace() + "' is found in 'ImportCollection'."); Console.WriteLine("Index of '" + myImport.get_Namespace() + "' in 'ImportCollection' = " + myImportCollection.IndexOf(myImport)); Console.WriteLine("Deleting Import from 'ImportCollection'..."); myImportCollection.Remove(myImport); if (myImportCollection.IndexOf(myImport) == -1) { Console.WriteLine( "Import is successfully removed from Import Collection."); } }
プラットフォーム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に収録されているすべての辞書からImportCollection.IndexOf メソッドを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からImportCollection.IndexOf メソッド
を検索
- ImportCollection.IndexOf メソッドのページへのリンク