简体   繁体   中英

editing a text file in resource

I added a text file to a resource file in my c# project. In the application I see this file string like : ex.

    string fileContent = Properties.Resources.fileName;

My question is how can I edit the text file and save it back into the resource file using code?

You probably shouldn't be trying to un-bake an apple pie.

The program resources were NOT meant to be a writable database. You should be loading and saving this information in the Environment.SpecialFolders.etc location.

If you "must" try this, an answer to this question might do what you want: Modifying resource contents of a running executable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM