Home

File path?

I would like to read in a file like:

string json = File.ReadAllText("config.json");

But I am not sure
a) Where to place this file. When LINQPad starts up where is the working folder?
b) Ideally I would like to have this file part of the program. Where can I put this file so that it will always be there?

Thank you.

Comments

  • The working folder can be defined in the shortcut you use to launch LINQPad, just like with any other Windows application. You can find the working folder using `System.IO.Directory.GetCurrentDirectory()`
Sign In or Register to comment.