title: How to read key/value in xml file
body: <p>I am trying to build a console project which reads an ASP.NET project's web.config file. I need to read a value from the config. I am putting what I want to read from the web.config file.</p>
  
  <pre><code>&lt;appSettings&gt;
    &lt;add key="LogoFrmNumber" value="001"/&gt;
    &lt;add key="LogoFrmPeriod" value="01"/&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>I want to read LogoFrmNumber's value like I read regular xml file. How can I read that value.</p>
  
  <p>here is my code to read web.config but I am stuck.</p>
  
  <pre><code>XDocument doc = XDocument.Load( "c://web.config" );
  
  var values = doc.Descendants( "AppSettings" );
  
  foreach ( var value in values )
  {
       Console.WriteLine( value.Value );
  }
  Console.ReadLine();
  </code></pre>