Click here to Skip to main content
15,886,362 members
Articles / All Topics

Anonymous Methods

15 Feb 2013CPOL 766  
CodeProjectIn versions of C# previous to 2.0, the only way to declare a delegate was to use named methods. C# 2.0 introduces anonymous methods.Creating anonymous methods is essentially a way to pass a code block as a delegate parameter. For example:// Create a handler for a click eventbutton1.Click
Only logged in members can view this content

Please go to the All Topics Table of Contents to view the list of available articles in this section.