Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有标准main.resx文件的 Windows 窗体项目,其中.ecfg保存了一个文件(配置文件)。
main.resx
.ecfg
如何将此文件提取到硬盘驱动器?
检查资源文件上的命名空间。通常它们被放入 Properties 命名空间中。然后,您可以像这样访问该文件:
byte[] b = Properties.Main.Something; //Something being the name of the resource System.IO.File.WriteAllBytes(@"C:\temp\yourfile.ecfg", b);