Reputation: 3641
I have a Windows Forms project with the standard main.resx
file where a .ecfg
file is saved (configuration file).
How can I extract this file to the hard drive?
Upvotes: 1
Views: 332
Reputation: 38077
Check the namespace on your resource file. Usually they are put into the Properties namesapce. You can then access the file like this:
byte[] b = Properties.Main.Something; //Something being the name of the resource
System.IO.File.WriteAllBytes(@"C:\temp\yourfile.ecfg", b);
Upvotes: 2