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

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

ResourceReader.GetEnumerator メソッド

この ResourceReader の列挙子を返します

名前空間: System.Resources
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Function GetEnumerator As
 IDictionaryEnumerator
Dim instance As ResourceReader
Dim returnValue As IDictionaryEnumerator

returnValue = instance.GetEnumerator
public IDictionaryEnumerator GetEnumerator ()
public:
virtual IDictionaryEnumerator^ GetEnumerator () sealed
public final IDictionaryEnumerator GetEnumerator ()
public final function GetEnumerator () : IDictionaryEnumerator

戻り値
この ResourceReader の IDictionaryEnumerator。

例外例外
例外種類条件

InvalidOperationException

リーダーが既に閉じられているため、アクセスできません。

使用例使用例
Imports System
Imports System.Resources
Imports System.Collections
Imports Microsoft.VisualBasic

Class EnumerateResources
   
   Public Shared Sub Main()
      ' Create a ResourceReader for the file items.resources.
      Dim rr As New ResourceReader("items.resources")
      
      
      ' Create an IDictionaryEnumerator to iterate through the resources.
      Dim id As IDictionaryEnumerator = rr.GetEnumerator()
      
      ' Iterate through the resources and display the contents to the
 console. 
      While id.MoveNext()
         Console.WriteLine(ControlChars.NewLine + "[{0}] "
 + ControlChars.Tab + "{1}", id.Key, id.Value)
      End While 

      rr.Close()

   End Sub

End Class
using System;
using System.Resources;
using System.Collections;

class EnumerateResources 
{
    public static void Main()
 
    {
        // Create a ResourceReader for the file items.resources.
        ResourceReader rr = new ResourceReader("items.resources");
 

        
        // Create an IDictionaryEnumerator to iterate through the resources.
        IDictionaryEnumerator id = rr.GetEnumerator(); 

        // Iterate through the resources and display the contents to
 the console. 
        while(id.MoveNext())
          Console.WriteLine("\n[{0}] \t{1}", id.Key, id.Value); 

        rr.Close();     
 
    }
}
using namespace System;
using namespace System::Resources;
using namespace System::Collections;
int main()
{
   
   // Create a ResourceReader for the file items.resources.
   ResourceReader^ rr = gcnew ResourceReader( "items.resources" );
   
   // Create an IDictionaryEnumerator* to iterate through the resources.
   IDictionaryEnumerator^ id = rr->GetEnumerator();
   
   // Iterate through the resources and display the contents to the
 console.
   while ( id->MoveNext() )
      Console::WriteLine( "\n [{0}] \t {1}", id->Key, id->Value );

   rr->Close();
}

import System.*;
import System.Resources.*;
import System.Collections.*;

class EnumerateResources
{   

    public static void main(String[]
 args)
    {
        // Create a ResourceReader for the file items.resources.
        ResourceReader rr = new ResourceReader("items.resources");

        // Create an IDictionaryEnumerator to iterate through the resources.
        IDictionaryEnumerator id = rr.GetEnumerator();

        // Iterate through the resources and display the
        // contents to the console. 
        while (id.MoveNext()) {
            Console.WriteLine("\n[{0}] \t{1}", id.get_Key(), id.get_Value());
        }
        rr.Close();
    } //main 
} //EnumerateResources
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ResourceReader クラス
ResourceReader メンバ
System.Resources 名前空間
IDictionary
IDictionaryEnumerator


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS