using System;
using System.Collections;
using System.Resources;
namespace ConsoleS2H
{
class Program
{
static void Main(string[] args)
{
// Create a ResXResourceReader for the file items.resx.
ResXResourceReader rsxr = new ResXResourceReader("address.resx");
// 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()+":\t");
}
//Close the reader.
rsxr.Close();
Console.ReadLine();
}
}
}
转载于:https://www.cnblogs.com/jiangj/archive/2010/12/06/1897932.html