Not all of our event handlers contain massive amounts of code, every now and again all we want is a line or two of code. With anonymous delegates we can write our event handlers inline, saving us creating new methods for just a couple of lines. There is an argument that a simple inline event handler is easier to read and follow. I’ve seen more and more using this technique, just make sure its not abused.

yellow.Click += new RoutedEventHandler(delegate(object s, RoutedEventArgs re) { gshape.Fill = Brushes.Yellow; });