title: Extracting the first 10 lines of a file to a string
body: <pre><code>public void get10FirstLines()
  { 
       StreamReader sr = new StreamReader(path);
       String lines = "";
       lines = sr.readLine();
  }
  </code></pre>
  
  <p>How can I get the first 10 lines of the file in the string?</p>