 <p>One of the "old school" approaches before linq saved all our butts from this kind of thing. Uncompiled as I'm on mobile atm (doing code on a mobile is hard, just so you know).</p> <pre><code>private List&lt;int&gt; test() { var intResults = new List&lt;int&gt;(); var file = File.ReadLines("blah"); foreach (var line in file) { var lineSplit = line.Split( new char[] { ' ', '\t', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); foreach (var item in lineSplit) { var result = 0; if (int.TryParse(item, out result)) intResults.Add(result); } } return intResults; } </code></pre> <p>I don't expect this to be the answer as the linq option is much more elegant but it's just showing other ways of achieving the same goal :)</p> <p>Edit: Method wasn't returning anything -_-</p>