After gazing into my crystal ball in an effort to divine the contents of said text files, I got nothin.
Loading a text file (or finding out how to) is beyond the trivial.
using (StreamReader stream = new StreamReader("TestFile.txt"))
{
String text = stream.ReadToEnd();
}
if (!string.isNullOrEmpty(text)
{
string[] lines = text.Split('\n');
string lines[];
foreach(string line in lines)
{
}
}
I recommend that you work on your google foo.
EDIT: MTH 2016-12-05
You have a variable's scope problem (
String text
).
It will fail on files that don't fit in memory.
And it could be a bit simpler.
foreach (string line in File.ReadLines("TestFile.txt"))
{
}