title: Storing a method as a member variable of a class
body: <p>I have this as one of my members of the class 'KeyEvent':</p>
  
  <pre><code>private delegate void eventmethod();
  </code></pre>
  
  <p>And the constructor:</p>
  
  <pre><code>public KeyEvent(eventmethod D) 
  {
      D();
  }
  </code></pre>
  
  <p>What I want to do is instead of calling D() there, I want to store that method (D) as a member variable of KeyEvent, so something like:</p>
  
  <pre><code>stored_method = D();
  </code></pre>
  
  <p>And then later in another method of KeyEvent, do something like:</p>
  
  <pre><code>stored_method();
  </code></pre>
  
  <p>How can I do this?</p>