比如我放了一个1.ico文件、怎么读取出来?
谢谢!!

解决方案 »

  1.   

    // Create a ResXResourceReader for the file items.resx.
          ResXResourceReader rsxr = new ResXResourceReader("items.resx");      // Create an IDictionaryEnumerator to iterate through the resources.
          IDictionaryEnumerator id = rsxr.GetEnumerator();             // 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());
          }     //Close the reader.
         rsxr.Close();
      

  2.   

    好像有直接的工具,例如:Resource Editor之类的
      

  3.   

    System.IO.Stream GetEmbeddedResource(string strname) 
    {
    return System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(strname) ;
    }
      

  4.   

    有这么复杂么?
    直接
    Properties.Resources.*****