最好用resources
private ResourceSet rm =new ResourceSet(Application.StartupPath + "\\aa.resources");
string bb = rm.GetString("lll");

解决方案 »

  1.   

    using System.Resources;string sFile="c:\\1.resource";
    ResourceWriter rw=null;
    Image b=pictureBox1.Image; 
    rw=new ResourceWriter(sFile);  //调用时,自动将该文件的内容清空
    rw.AddResource("ToolIcon",b);  //工具图标
    if(rw!=null) 
    {
       rw.Close();   //写入资源文件中
       rw=null;
    }读取资源中的“值,键对” 
    IResourceReader reader = new ResourceReader(你的资源文件);
          IDictionaryEnumerator en = reader.GetEnumerator();
          
          // Goes through the enumerator, printing out the key and value pairs.
          while (en.MoveNext()) {
             Console.WriteLine();
             Console.WriteLine("Name: {0}", en.Key);
             Console.WriteLine("Value: {0}", en.Value);
          }
          reader.Close();
       }
      

  2.   

    i had solved.  thanks