c# - access textfiles located in resources -


how can bring files (located in resources) life. means every time program launches, delete in directory except self, extract files . want files created in currentdirectory.

can u provide concept how extract files in directory. delete when program starts again,

ps: files end in .ovpn (they not binary because can read in notepad.. how can make files .ovpn in filesystem? tnx

to file compiled embedded resource can this:

using (var stream = assembly.getcallingassembly()           .getmanifestresourcestream("namespace.filename.extension")) {     // write file... } 

of course need use assembly resource resides in.

so file called 'help.txt' in namespace 'mycompany.myproduct' call:

getmanifestresourcestream("mycompany.myproduct.help.txt") 

hope gets on way.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -