There is a text file that I have created in my project root folder. Now, I am trying to use Process.Start() method to externally launch that text file.
The problem I have got here is that the file path is incorrect and Process.Start() can't find this text file. My code is as follows:
Process.Start("Textfile.txt"); So how should I correctly reference to that text file? Can I use the relative path instead of the absolute path? Thanks.
Edit: If I change above code to this, would it work?
string path = Assembly.GetExecutingAssembly().Location; Process.Start(path + "/ReadMe.txt");
Process.Startfor embedded resources. Check the properties and set the attributeCopy to Output Directoryrespectively.