title: Using streamreader in C# to save text between <h1></h1> tags in a string
body: <p>I am using streamreader in C# and my goal is to read a text file with it and it must filter out text between the tags (like <code>&lt;Test&gt; &lt;/Test&gt;</code>  or <code>&lt;Name&gt; &lt;/Name&gt;</code> ) 
  And get the name of the tag like ( Test or Name) then save it to a string with the tag name for use later.
  I have searched the internet for a few days now but cant find anything, and i dont have much experience with C# but hope there is some one who can help me.
  The file itself is a .txt file</p>
  
  <p>here is the code i have until now :</p>
  
  <pre><code>class Program
      {
          static void Main(string[] args)
          {
  
              using (StreamReader sr = new StreamReader(@"C:\testfile.txt"))
              {
  
                  String line;
                  // Read line by line
                  while ((line = sr.ReadLine()) != null)
                  {
                      Console.WriteLine(line);
  
                  }
              }
              Console.ReadKey();
          }
  
      }
  </code></pre>
  
  <p>expected output is for example a string with name = everything between the name tag in plain text then test = everyting between the test tags in plain text.
  sorry for my bad english but i hope there is some one who can helpe me.</p>