title: How to override default(T) in C#?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5088682/howto-change-what-defaultt-returns-in-c-sharp">Howto change what Default(T) returns in C#</a>  </p>
  </blockquote>
  
  
  
  <pre><code>print(default(int) == 0) //true
  </code></pre>
  
  <p>Similarly if I have a custom object, its default value will be null.</p>
  
  <pre><code>print(default(Foo) == null) //true
  </code></pre>
  
  <p>Can I have a custom value for <code>default(Foo)</code> and not null?</p>
  
  <p>For example, something like this: </p>
  
  <pre><code>public static override Foo default()
  {
      return new Foo();
  }
  </code></pre>
  
  <p>This wont compile. Thanks..</p>