StreamReader C# - read only a specific line
<p>I am trying to log only 3rd line (or lines 1 to 3 if logging just one line is not possible) from a webResposne.</p>

<p>here is a snippet of the code that I am using for now.</p>

<pre><code>StreamReader read = new StreamReader(myHttpWebResponse.GetResponseStream(), System.Text.Encoding.UTF8);
        String result = read.ReadToEnd();
        Log("Access", Server.HtmlEncode(result), "Success");
</code></pre>

<p>I am getting the following output</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Access is Granted.&lt;/title&gt;
    &lt;style&gt;
     body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
     p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
     b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
     H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
     H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
...
</code></pre>

<p>and so on.</p>

<p>I would just like to log "(title>Access is Granted.(/title>" and not print anything else (or anything after that line).</p>

<p>How would I go about doing that?</p>

<p>Thank you</p>
