Ok so I have the following code:
string numbers = File.ReadAllText("numbers.txt");
StringSplitOptions.RemoveEmptyEntries);
List<string> List = new List<string>();
List.AddRange(allNumbers);
return List;
Currently the numbers.txt file is in a directory on my machine, but I want the text file to be integrated into my solution in a file such as numbers/numbers.txt. How do I read from that file instead of reading it from the default file VS2010 likes to read from? I already have a file in my solution called numbers with the respective file in it.
Something like this:
Make sure you set the “Copy to output directory” property to “Copy if newer” for the file in question in your project.