Tuesday, November 11, 2014

Anonymous Method C# Asp.net

As name suggest without name inline method. Anonymous method concept was introducing 2.0. So it is creating by using delegate keyword (A delegate is a type that represents references to methods with a particular parameter list and return type).  Here is the example how to use the anonymous method
 
button1.Click += delegate(System.Object o, System.EventArgs e)
                   { ltrMessage.Text=”Example of anonymous Method”};

No comments:

Post a Comment

http://blogsiteslist.com