Overview of Delegates(C#)

Overview of Delegates(C#)

Definetion:Delegate is nothing but the pointing the function.

How to call method using Delegate:

delegate void getvalue(); //Above class you have to declare delegate
public partial class Global : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
getvalue test=new getvalue(testpgmr);
test();
}
protected void testpgmr()
{
Response.Write(”pgmr”);
}

Output

pgmr

Leave a Reply


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.