title: C# Override virtual function without having to implement another class
body: <p>I am trying to override a virtual function only for a single defined element (without having to create another class that implements it and then adding a function to override it..).</p>
  
  <p>Example:</p>
  
  <pre><code>public class MyClass
  {
      public virtual bool ChangeStatus(String status)
      {
          return false;
      }
  }
  
  
  void test()
  {
      //The following is written as an example of what I am trying to achieve &amp; does not work
      MyClass blah = new MyClass()
      {
          public override bool ChangeStatus(String status)
          {
              return true;
          }
      };
  }
  </code></pre>
  
  <p>Any idea how to achieve this?</p>
  
  <p>Thanks.</p>