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
You use the delegate
keyword for anonymous methods:
Timer myTimer = new Timer();
myTimer.Tick += delegate(object sender, EventArgs e) {
MessageBox.Show("Hello world!");
};
In C# 3.0 and later, you can also use lambdas:
Timer myTimer = new Timer();
myTimer.Tick += (sender, e) => MessageBox.Show("Hello world!");