The Power of Anonymous Methods in C#(weblogs.asp.net)
submitted by
antny(55) 5 years, 1 month ago
Anonymous methods are a new feature in C# 2.0 that allow you to hook an action directly to an event as opposed to having a separate event handler. For example, when a user clicks a button and you need to pop-up a MessageBox, you could handle it the standard way with a delegate and an event handler, or you could hook the action to perform directly to the Click event using an anonymous method as shown next
|category: C#
|Views: 34
tags:
AnonymousMethods C#2.0 C# .net2.0 another
Everyones tags:
Your Tags: