问题
I just want to add the external file in C# desktop application to store the queries. In that I want to add each query as string. And will take out of the file when needed.
1) How to add external file in C# desktop application. 2) How can i access the file from my application?
Thanks in advance.
回答1:
There are a couple of options:
Add the file to the project and set the "Copy to Output Folder" option. Then make sure you deploy the file with the application.
Make the file an embedded resource. Then it becomes part of the exe and you don't have to deal with a separate file for deployment.
来源:https://stackoverflow.com/questions/24660257/how-to-add-the-external-file-to-c-sharp-application