How to add the external file to C# application? [closed]

故事扮演 提交于 2019-12-14 04:03:33

问题


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:

  1. Add the file to the project and set the "Copy to Output Folder" option. Then make sure you deploy the file with the application.

  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!