title: How to find out how many characters a file has without reading the whole of it?
body: <p>If the file is a text file, and <code>StreamReader</code> can figure out the <code>Encoding</code> it uses, how can I find out how much characters it has without reading the whole file?</p>
  
  <p>I'm reading 1GB CSV files and it takes at least 4 seconds to read it with a <code>StreamReader</code>. <code>File.ReadAllText().Length</code> would cause <code>System.OutOfMemoryException</code>.</p>
  
  <p>I imagine if I had the <code>FileInfo(filename).Length</code> and the <code>Encoding</code>, then I can calculate the number of characters.</p>