How to transparently track line numbers from a character stream in C#?
<p>I'd like to seek to an arbitrary point in a character stream and then get the corresponding line number.  In Java, this can be handled transparently with the java.io.LineNumberReader.getLineNumber() method. </p>

<p>What's the best way to go about this in C#?</p>
