title: Object reference not set to an instance of an object using linq to xml
body: <pre><code>        &lt;?xml version="1.0" encoding="utf-8"?&gt;
           &lt;root&gt;
             &lt;Message type="sms"&gt;
             &lt;Details locale="en" message-type="User.ResetPassword" /&gt;
             &lt;Context&gt;
             &lt;Parameter name="Time" value=" 16:03:31" /&gt;
             &lt;Parameter name="pswr" value="00" /&gt;
             &lt;Parameter name="Date" value="18/12/2014" /&gt;
            &lt;/Context&gt;
           &lt;Receiver&gt;+923328749199&lt;/Receiver&gt;
          &lt;/Message&gt;
  </code></pre>
  
  <p>
   and my code is</p>
  
  <pre><code>     XElement xelement = XElement.Load("C:\\Users\\qadeer.hussain\\Desktop\\gw-msg-2.xml");
      var name = from nm in xelement.Elements("Message")
                 where (string)nm.Element("Receiver") == "+923328749199"
                 select nm;
      foreach (XElement xEle in name)
          Console.WriteLine(xEle.value);
  </code></pre>
  
  <p>i dont know why i am getting this error can u please help me to solve this probem</p>