ItsMods

Full Version: C# Stream Reader
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys, i need help.
How in C# with Stream Reader read String?
I have file text.txt
Her contents:

stringone
stringtwho
stringthird

How in C# i can full find NEXT string?
I get string stringone , and how me get next string stringwho (i dont know how next string named (be called).

If i know i make check.Example if(stringone )
{Show("Next stringtwo"} ... ets
But i IDK next name string!
Thanks in Feauture
Use streamreader.
snip
Code:
List<string> readAllLines(string path) {
    var lines = new List<string>();
    using(var reader = new StreamReader(path)) {
        while (reader.Peek() >= 0) {
                    lines.add(reader.ReadLine());
                }
    }
    return lines;
}
File.ReadAllText
Thanks @dtx12 & @Nekochan