C#/delegates

Advertisement


Question
i am isha can you explain the concept of delegates. what are delegates and why do we need to create delegates in our program.

Answer
A delegate in C# is similar to a function pointer in old C or C++. Delegate allows to encapsulate a reference to a method inside a delegate object.

The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.



May be this URL will provide y ou more info

http://msdn.microsoft.com/en-us/library/ms173171%28VS.80%29.aspx

Happy Programming!

Srini

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

can answer any kind of questions in ASP.NET, C#, VB.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience

Contact me if you need any custom development on ASP.NET, ASP, Coldfusion, Powerbuilder

©2012 About.com, a part of The New York Times Company. All rights reserved.