Reading a ~180KB file line by line results in StackOverflowException : <p>This text file has ~15,000 short lines. I read it this way:</p>

<pre><code>using (var reader = new StreamReader("words.txt")) {
    while (reader.Peek() &gt;= 0) {
        list.Add(reader.ReadLine());
    }
    var r = new Random();
    var randomLineNumber = r.Next(0, list.Count - 1);
    InterfacePassword.Text = list[randomLineNumber].ToString();
}
</code></pre>

<p>It's frankensteined from other SO answers, I'm not sure if it would actually do what I want. Unfortunately it results in <code>StackOverflowException</code> and I don't understand why - I loaded files of larger sizes before.</p>
