Is there a C# language construct/framework object to apply a function to each line of a file?
<p>What I'm looking for is something along these lines:</p>

<pre><code>var f = UsefulFileObject(@"c:\temp.log");
f.ForEachLine( (line) =&gt; line.Trim() );
</code></pre>

<p>After that I'd expect each line in the file to be trimmed.</p>

<p>Is there such an object in the framework already or should I start making my own one?</p>
