title: Retrieve the stream file name from a XmlTextReader
body: <p>This is somewhat trivial but here goes.  I am passing an XmlTextReader object to a method using .Net 4.0 framework.</p>
  
  <pre><code>public void TestMethod(XmlTextReader reader)
  {
      try
      {
          //...
          //Logic
          //...
      }
      catch(Exception ex)
      {
          //I also want to log the file location of the XmlTextReader!
          Log(ex.Message);
      }
  }
  </code></pre>
  
  <p>If something happens to the reader I want to log where the file the XmlTextReader is reading from.  Is there an easy way to get back to the stream the XmlTextReader is using?  The reason it is somewhat trivial is that I could easily pass in an additional string to the method containing the file location used to create the stream, but it just seems that has to be a way using only the XmlTextReader.  </p>
  
  <p>Thanks!</p>
  
  <p>Update, this is actually what I'm doing... Sorry for the bad example:</p>
  
  <pre><code>public void TestMethod(XmlTextReader reader)
  {
          //...
          //Logic
          //...
  
      if(something_inside_the_XML)
      throw new Exception(FileLocation);
  }
  </code></pre>