title: Create anonymous class that implements an interface
body: <p>I am wondering if there is some inline short way of creating a class implementing a interface. Just like there are the anonymous methods but with implementing interfaces.</p>
  
  <p>The problem is:</p>
  
  <pre><code>interface iSomeInterface
  {
    void DoIt();
  }
  
  public void myMethod(iSomeInterface param)
  {
   ...
  }
  </code></pre>
  
  <p>And I would like to use it like this:</p>
  
  <pre><code>object.myMethod(new { override DoIt() { Console.WriteLine("yay"); } } : iSomeInterface);
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Sorry in case its a duplicate.</p>