1、visual studio 鼠标右键点击资源文件的属性,在属性中生成操作选项选择嵌入资源
2、 Assembly myAssembly = Assembly.GetExecutingAssembly();
Stream myStream = myAssembly.GetManifestResourceStream("YourProgramNameSpace.SubDirectory.YourFilename");
上述字符串是区分大小写的