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

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

ResXResourceReader.GetEnumerator メソッド

現在の ResXResourceReader オブジェクト列挙子を返します

名前空間: System.Resources
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Function GetEnumerator As
 IDictionaryEnumerator
Dim instance As ResXResourceReader
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。

解説解説

GetEnumerator メソッドは、現在の ResXResourceReader オブジェクト関連付けられている XML リソース (.resx) ストリームまたは文字列の名前と値のペア取得します

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

Class ReadResXResources
   
   Public Shared Sub Main()
      
      ' Create a ResXResourceReader for the file items.resx.
      Dim rsxr As ResXResourceReader
      rsxr = New ResXResourceReader("items.resx")

      ' Create an IDictionaryEnumerator to iterate through the resources.
      Dim id As IDictionaryEnumerator = rsxr.GetEnumerator()
            
      ' Iterate through the resources and display the contents to the
 console.
      Dim d As DictionaryEntry
      For Each d In  rsxr
         Console.WriteLine(d.Key.ToString() + ":"
 + ControlChars.Tab + d.Value.ToString())
      Next d
      
      'Close the reader.
      rsxr.Close()

   End Sub

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

class ReadResXResources
{
   public static void Main()
   {
   
      // Create a ResXResourceReader for the file items.resx.
      ResXResourceReader rsxr = new ResXResourceReader("items.resx");

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

      // Iterate through the resources and display the contents to the
 console.
      foreach (DictionaryEntry d in rsxr) 
      {
    Console.WriteLine(d.Key.ToString() + ":\t" + d.Value.ToString());
      }

     //Close the reader.
     rsxr.Close();
   }
}
#using <system.windows.forms.dll>
#using <System.dll>

using namespace System;
using namespace System::Resources;
using namespace System::Collections;
void main()
{
   
   // Create a ResXResourceReader for the file items.resx.
   ResXResourceReader^ rsxr = gcnew ResXResourceReader( "items.resx" );
   
   // Create an IDictionaryEnumerator* to iterate through the resources.
   IDictionaryEnumerator^ id = rsxr->GetEnumerator();
   
   // Iterate through the resources and display the contents to the
 console.
   IEnumerator^ myEnum = rsxr->GetEnumerator();
   while ( myEnum->MoveNext() )
   {
      DictionaryEntry^ d = safe_cast<DictionaryEntry^>(myEnum->Current);
      Console::WriteLine( "{0}:\t {1}", d->Key, d->Value );
   }

   
   //Close the reader.
   rsxr->Close();
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ResXResourceReader クラス
ResXResourceReader メンバ
System.Resources 名前空間


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS