title: Serialize only those properties which are specified [XmlElement] without changing the original class
body: <p>Code:</p>
  
  <pre><code>[Serializable]
  public class MyClass
  {
      [XmlElement("Company")]
      public string Company { get; set; }
  
      [XmlElement("Amount")]
      public decimal Amount { get; set; }
  
      public int companyid { get; set; }
  }
  </code></pre>
  
  <p>Now I want to serilize only thoese which are specified with <code>[XmlElement]</code>, companyid not to be serilized.</p>
  
  <p>So, what can I do?</p>