Free mag vol1 | Page 447

CHAPTER 10  DELEGATES, EVENTS, AND LAMBDA EXPRESSIONS { } } Car c = (Car)sender; Console.WriteLine("Critical Message from {0}: {1}", c.PetName, e.msg);  Source Code The PrimAndProperCarEvents project is located under the Chapter 10 subdirectory. The Generic EventHandler Delegate Given that so many custom delegates take an object as the first parameter and an EventArgs descendant as the second, you could further streamline the previous example by using the generic EventHandler type, where T is your custom EventArgs type. Consider F