title: How to have all my classes default functionalities like .ToString method
body: <p>I want to have all my classes some set of behaviour like all classes in .net (ToString, GetHashCode etc.) have.
  But I don't want to create a base class which have these type of functions and inherit all the classes from this base class. By going this way I will lost the liberty of inherting my classes from any other class (since .net support inheritance from only one class).</p>
  
  <p>How .net framework create a class without inherting from base object class but has virtual behaivour in all classes?</p>
  
  <p>We don't write like this </p>
  
  <pre><code>class MyClass : System.Object
  {
  }
  </code></pre>
  
  <p>but MyClass gets virtual functions of System.Object.</p>