title: Can I tie an anonymous function to a Timer's tick event?
body: <p>If a Tick-handling function will only be used in one context (i.e. always in the same function in combination with the same Timer object), why bother make it a separate function? That's the thought that went through my head when I thought of this.</p>
  
  <p>Is it possible to tie an anonymous function to a Timer's tick event? Here's what I'm trying to do.</p>
  
  <pre><code>Timer myTimer = new Timer();
  myTimer.Tick += new EventHandler(function(object sender, EventArgs e) {
    MessageBox.Show("Hello world!");
  });
  </code></pre>