다음을 통해 공유


.NET Samples - How To: Resources

This section includes the following samples:

ReadWriteResources Sample

MultipleResources Sample

UseResources Sample

CreateResources Sample

List Sample

CreateAspxRes Sample

ReadWriteResources Sample

This sample illustrates how to read and write resource files through code.

Namespaces used in this sample:

System; System.Drawing; System.IO; System.Resources; System.Collections

Classes used in this sample:

Message; File; String; Object; EventArgs; Import; ResourceReader; ResourceManager; Exception; Image; ResourceWriter; Bitmap; Url

MultipleResources Sample

This sample is a small Windows Forms application that uses the resources created in the related sample.

Namespaces used in this sample:

System; System.Drawing; System.Resources; System.Windows.Forms; System.Threading; System.Reflection; System.Globalization

Classes used in this sample:

Label; String; Bitmap; Control; Font; ResourceWriter; Form; Version; Thread; CultureInfo; ResourceManager; Image; Assembly; PictureBox; Object; Style; FontFamily; Application

UseResources Sample

This sample demonstrates how to use resource files, dynamically loading a particular resource based on a selected culture.

Namespaces used in this sample:

System; System.Globalization; System.Reflection; System.Resources

Classes used in this sample:

Console; String; Convert; CultureInfo; Exception; Missing; Assembly; ResourceManager

CreateResources Sample

This sample shows you how to create and use resources to allow you to develop robust, culture-aware programs without having to recompile your application when resources change.

Namespaces used in this sample:

System; System.Globalization; System.Reflection; System.Resources

Classes used in this sample:

Console; String; Convert; CultureInfo; Exception; Missing; Assembly; ResourceManager

List Sample

This sample demonstrates creating a basic class that implements IResourceReader.

Namespaces used in this sample:

System; System.Globalization; System.Resources; System.Collections

Classes used in this sample:

ResourceSet; ResourceManager; Console; Hashtable; Hash; ResourceReader; CultureInfo; String

CreateAspxRes Sample

This sample demonstrates how to set up your ASPX application to work with the resources created in the related sample.

Namespaces used in this sample:

System; System.Threading; System.IO; System.Globalization; System.Resources

Classes used in this sample:

String; Message; Object; EventArgs; Convert; Import; ResourceManager; Exception; CultureInfo; Missing; Path; Thread; Application; DropDownList; Page; File; Directory