If you do not specify a path when saving, then the file will be saved in the current working directory (which is normally the location of the executable).
Same for loading, if you don’t specify the full path then it assumes the current working directory.
To save a file you would do something like this:
System.IO.File.WriteAllText(@"C:\Temp\MyTextFile.txt", "The text to write to the file");
to read it
string myText = "";
myText = System.IO.File.ReadAllText(@"C:\Temp\MyTextFile.txt");
You need to be aware of where you are trying read and write to. Some locations may require administrator privileges and will throw an exception if you don’t have access.
I prefer to save all settings in the users Application Data path.
You can get that path with this:
string path = "";
path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);