title: C# Serialization and maintainability
body: <p>I really like the ease and flexibility of using <code>XmlSerializer</code> to persist configuration data for my application.  However, I can see potential maintainability issues.</p>
  
  <p>From looking at my class definitions, it is not obvious that the reason certain fields are exposed as properties is for serialization purposes.  Somebody could come along and remove a property (leaving the private field alone) and inadvertently cause issues due to important information no longer being serialized to XML.  </p>
  
  <p>I could add comments to explain this, but I'd rather the code spoke for itself.</p>
  
  <p>There exists the <code>[Serializable]</code> attribute (which hints that the class is to be serialized), but this isn't actually required for the <code>XmlSerializer</code> and is therefore unnecessary.</p>
  
  <p>I could write some custom serialization code but then I lose the simplicity of using <code>XmlSerializer</code>.</p>
  
  <p>Is there a way of decorating my code to make it clear which classes and which properties are candidates for XML serialization?</p>