ResourceReader.System.IDisposable.Dispose メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As ResourceReader CType(instance, 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(); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からResourceReader.System.IDisposable.Dispose メソッドを検索する場合は、下記のリンクをクリックしてください。

- ResourceReader.System.IDisposable.Dispose メソッドのページへのリンク