title: Using delegates with non static methods in C#
body: <p>Asking the same question as 
  <a href="https://stackoverflow.com/questions/14860002/">Using delegates with non static methods [no picked answer]</a>
  so as to bring a closure to it. </p>
  
  <p>So I use @Adam Marshall's solution, it works, but as soon as I start using it, i.e., <code>Testit()</code>:</p>
  
  <pre><code>using System;
  
  public class TestClass
  {
      private delegate void TestDelegate();
      TestDelegate testDelegate;
  
      public TestClass()
      {
          testDelegate = new TestDelegate(MyMethod);
      }
  
      public static void Testit()
      {
          testDelegate();
      }
  
      private virtual void MyMethod()
      {
          Console.WriteLine("Foobar");
      }
  }
  
  public class Program
  {
      public static void Main()
      {
          Console.WriteLine("Hello World");
          TestClass.Testit();
      }
  }
  </code></pre>
  
  <p>It started to give the followig Error:</p>
  
  <blockquote>
    <p>A object reference is required for the non-static field, method, or property</p>
  </blockquote>
  
  <p>You can <a href="https://dotnetfiddle.net/OQ8k68" rel="nofollow noreferrer">test it out here </a>. 
  How to fix it? (Please fix it if possible instead of directing me to other posts, I've read them but am not able to understand them) Thx. </p>