如何使用资源文件
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Resources;
using System.Reflection;
namespace ResourceTest
{
class Program
{
static void Main(string[] args)
{
try
{
ResourceManager rm = new ResourceManager("ResourceTest.Resource1",
Assembly.GetExecutingAssembly());
string C1 = rm.GetObject("C1") as string;
Console.WriteLine(C1);
Console.ReadKey();
}
catch (Exception ex)
{
}
}
}
}