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

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

ResourceReader.System.IDisposable.Dispose メソッド

ResourceReader によって使用されているリソース解放します。

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

Private Sub System.IDisposable.Dispose Implements
 IDisposable.Dispose
void IDisposable.Dispose ()
private:
virtual void System.IDisposable.Dispose () sealed = IDisposable::Dispose
解説解説

Dispose呼び出すと、ResourceReader によって使用されているリソースを他の目的のために再割り当てできますDispose詳細については、「アンマネージ リソースクリーンアップ」を参照してください

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

Public Class ReadResources
   
    Public Shared Sub Main(args()
 As String)
        ' Create a resource reader for items.resources
        ' and get an enumerator to iterate through the file.
        Dim reader = New ResourceReader("items.resources")
        Dim en As IDictionaryEnumerator = reader.GetEnumerator()
      
        ' Iterate through the file, printing the key and value pairs.
        While en.MoveNext()
            Console.WriteLine()
            Console.WriteLine("Name: {0}", en.Key)
            Console.WriteLine("Value: {0}", en.Value)
        End While

        ' Clean up all resources associated with the reader.
        ' Calling Dispose is equivalent to calling Close.
        reader.Dispose()
    End Sub

End Class
using System;
using System.Resources;
using System.Collections;
 
public class ReadResources 
{
    public static void Main(string[]
 args) 
    {
        // Create a resource reader for items.resources
        // and get an enumerator to iterate through the file.
        IResourceReader reader = new ResourceReader("items.resources");
        IDictionaryEnumerator en = reader.GetEnumerator();
      
        // Iterate through the file, printing the key/value pairs.
        while (en.MoveNext()) 
        {
            Console.WriteLine();
            Console.WriteLine("Name: {0}", en.Key);
            Console.WriteLine("Value: {0}", en.Value);
        }
      
        // Clean up all resources associated with the reader.
        // Calling Dispose is equivalent to calling Close.
        reader.Dispose();
    }
}
using namespace System;
using namespace System::Resources;
using namespace System::Collections;
int main()
{
   array<String^>^args = Environment::GetCommandLineArgs();
   
   // Create a resource reader for items.resources
   // and get an enumerator to iterate through the file.
   IResourceReader^ reader = gcnew ResourceReader( "items.resources" );
   IDictionaryEnumerator^ en = reader->GetEnumerator();
   
   // Iterate through the file, printing the key/value pairs.
   while ( en->MoveNext() )
   {
      Console::WriteLine();
      Console::WriteLine( "Name: {0}", en->Key );
      Console::WriteLine( "Value: {0}", en->Value );
   }

   // Clean up all resources associated with the reader.
   // Calling the destructor is equivalent to calling Close.
   reader->~IResourceReader();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS