Notice that the Click event on the Button class is a reference to an EventHandler delegate, and so to add our own method to the list of subscribers, we need to also create an instance of the delegate.[3] Of course, it can quickly become tedious to figure out the delegate signatures of all the events you're interested in or to add controls to a form via code by hand
Luckily, it's also unnecessary because of the WinForms Wizard and the WinForms Designer
provided by Visual Studio .NET
No comments:
Post a Comment