I did right click on my project then Add > Existing Item and then selected the text file from the hard disk. Now i see the file on the right window in the solution explorer.
Now i want to do two things. First to make sure if someone else will use the project or only will run the exe or when i will make later installation that the program will be able to use the text file not only me. I mean that if someone else on his computer will use the program that it will not throw exception that the text file is missing.
Second how can i read from the file in the code ?
private void ManageDirectories()
{
string savedImagesPath = Path.GetDirectoryName(Application.LocalUserAppDataPath);
string mainPath = "Test";
mainPath = Path.Combine(savedImagesPath, mainPath);
//string[] lines = File.ReadAllLines
}
I want to read the lines of the text file using the File.ReadAllLines