Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

About delegates ?

Answer Posted / naren

1. Delegates holds reference to a method
2. Delegates are objects which points towards a function
which matches its signature
3. Delegates are reference type used to encapsulate method
with specific signature
4. Delegates are typesafe and secure

//declaring a delegate

delegate void SampleDelegate(string message)

//declaring delegate with same signature

static void SampleDelegateMethod(string message)
{
console.writeline(message);
}

//creating delegate method

SampleDelegate d1 = new SampleDelegateMethod();

//invoking method

d1(message);

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is mvc different from asp.net? : Asp.Net MVC

1100


How to disable cut, copy and paste in TextBox using jQuery in asp.net?

1255


Which is better session or viewstate?

988


What is latest version of asp.net mvc? : Asp.Net MVC

1155


What is IPostBack? How to use it?

1151


What are the versions of garbage collection?

1953


How do I know asp.net mvc version? : Asp.Net MVC

1096


How to do parallel database export in remote SQL Server in ESSL time track. It is working for local server but not working for remote SQL Server

6719


What is custom events?

1122


If I am developing an application that must accomodate multiple security levels though secure login and my asp.net web application is spanned across three web-servers (using round-robin load balancing). What would be the best approach to maintain login-in state for the users?

1138


State differences between MVC and WebAPI

1203


What is the difference between WindowsDefaultLocation and WindowsDefaultBounds?

1219


What New Features comes with ASP.NET Web API 2.0?

1077


What is session mode in asp.net?

1092


Differentiate between structure and class.

1070