title: How to handle null in xml and c#
body: <p>suppose i am trying to deserialize xml to my class and if any value is null or empty for decimal or datetime then how to handle the null.</p>
  
  <pre><code>[XmlElement(ElementName = "Salary" , typeof(double))]
  public string Salary { get; set; }
  
  [XmlElement(ElementName = "BirthDate" , typeof(DateTime))]
  public string Phone { get; set; }
  </code></pre>
  
  <p>suppose if BirthDate or Salary is null or empty in xml then how to handle it at the time of deserialization. need solution. thanks.</p>