Quote
A
B
C
B
C
Now, I want to create a new string for every line (string1, string2, string3) until the end of the text file.
So string1 should contain "A" and string2 "B", etc.
How do I do this?




Posted 15 November 2009 - 09:26 AM
Quote
Posted 15 November 2009 - 09:39 AM
List<string> lines = new List<string>();
using (StreamReader sr = new StreamReader(File.Open("mytextfile.txt", FileMode.Open, FileAccess.Read)))
{
string line = null;
while ((line = sr.ReadLine()) != null)
lines.Add(line);
}
Posted 15 November 2009 - 11:26 AM
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
