ImportCollection.IndexOf メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ImportCollection.IndexOf メソッドの意味・解説 

ImportCollection.IndexOf メソッド

指定した Import検索しコレクション内で最初に見つかった位置の 0 から始まるインデックス番号返します

名前空間: System.Web.Services.Description
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

使用例使用例

IndexOf メソッド使用する例を次に示します

' 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.");
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ImportCollection クラス
ImportCollection メンバ
System.Web.Services.Description 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からImportCollection.IndexOf メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からImportCollection.IndexOf メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からImportCollection.IndexOf メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ImportCollection.IndexOf メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ImportCollection.IndexOf メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS