Right now I am reading in text files in my C# code in Visual Studio. The text files are saved onto my computer and whenever we want to run the code on another computer, we have to change the path for the text file within the code so it will work. My question is, is there any place you can save the text files within the project so that you do not have to change the path everytime to run it on different computers?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Add the txt files to the project. Manage them in your source control just like any other file.
You can add any kind of file you like. They just sit there doing nothing ( it doesn't try to compile them or anything), you can group them into folders for better clarity.
You can add a folder to your project to hold the various text files:
You can place any type of file into this folder.
Hope this helps.