title: how to Check if a XML child element exists with Linq to XML
body: <p>How can I check if <code>IncomingConfig</code> element exists by use linq to xml?</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;settings&gt;
    &lt;IncomingConfig&gt;
      &lt;ip&gt;10.100.101.18&lt;/ip&gt;
      &lt;port&gt;5060&lt;/port&gt;
    &lt;/IncomingConfig&gt;
    &lt;Device&gt;
      &lt;username&gt;tarek&lt;/username&gt;
      &lt;AgentName&gt;tarek&lt;/AgentName&gt;
      &lt;password&gt;ffff&lt;/password&gt;
    &lt;/Device&gt;
    &lt;Device&gt;
      &lt;username&gt;adf&lt;/username&gt;
      &lt;AgentName&gt;adf&lt;/AgentName&gt;
      &lt;password&gt;fadsf&lt;/password&gt;
    &lt;/Device&gt;
  &lt;/settings&gt;
  </code></pre>