title: Overriding serialization for a particular .NET type
body: <p>Please consider this example class:</p>
  
  <pre><code>[Serializable]
  public class SomeClass
  {
      private DateTime _SomeDateTime;
  
      public DateTime SomeDateTime
      {
          get { return _SomeDateTime; }
          set { _SomeDateTime = value; }
      }
  }
  </code></pre>
  
  <p>I would like to alter the serialization of any DateTime declared in the class according to my own rules. The members of this class will change frequently and I don't want to maintain a custom serializer for every change. Also I would like this behaviour to be inherited by subclasses and not code a custom serializer for every one. The serialization is being output by a web service. Thanks for any help!</p>