title: HttpWebResponse difference between Headers and GetResponseHeader
body: <p>When i've got a HttpWebResponse object, there are two ways to access the response headers:</p>
  
  <pre><code>string dateHeader = webResponse.Headers["Date"];
  string dateHeader = webResponse.GetResponseHeader("Date");
  </code></pre>
  
  <p>They both return the same value, so why there are two ways to obtain header information?
  Looking at the .NET sources, if found the implementation for both in HttpWebReponse:</p>
  
  <pre><code>    // retreives response header object 
      /// &lt;devdoc&gt;
      ///    &lt;para&gt; 
      ///       Gets 
      ///       the headers associated with this response from the server.
      ///    &lt;/para&gt; 
      /// &lt;/devdoc&gt;
      public override WebHeaderCollection Headers {
          get {
              CheckDisposed(); 
              return m_HttpResponseHeaders;
          } 
      } 
  
      /// &lt;devdoc&gt;
      ///    &lt;para&gt; 
      ///       Gets a specified header value returned with the response.
      ///    &lt;/para&gt; 
      /// &lt;/devdoc&gt; 
      public string GetResponseHeader( string headerName ) {
          CheckDisposed(); 
  
          string headerValue = m_HttpResponseHeaders[headerName];
  
          return ( (headerValue==null) ? String.Empty : headerValue ); 
      }
  </code></pre>
  
  <p>Only thing i can see is, that with the Headers property i can enumerate through all availiable headers. Any ideas?</p>
  
  <p>Thanks!</p>