title: Serializing a class using XMLSerializer not showing fields C#
body: <p>I have a class with two properties (which are generated from xsd using <code>xsd.exe</code>) and filling them and trying serialize them to xml with below code.</p>
  
  <p>I'm able to get xml with elements in it but without its fields/elements which I have assigned</p>
  
  <pre><code>OrganizationDetail objOrgDet = new OrganizationDetail();
  objOrg.IsDataLimitedSet =true;
  
  Organization objOrg = new Organization();
  objOrg.Orgainzation_Detail = objOrgDet;
  
  XmlSerializer serailizer = new XmlSerializer(typeof(Organization));
  StringWriter strwritter = new StringWriter();
  
  serailizer.Serialize(strwritter, objOrg);
  string xml = strwritter.ToString();
  </code></pre>
  
  <p>And the resulted xml is </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-16"?&gt;
  &lt;Organization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;Organization_DETAIL xmlns="http://www.mismo.org/residential/2009/schemas" /&gt;
  &lt;/Organization&gt;
  </code></pre>
  
  <p>This doesn't have a field I have set.</p>