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
What is synchronous and Asynchronous post back ?
What are the main differences between asp and asp.net?
How does ASP.NET framework maps client side events to Server side events.?
How do I use a proxy server when invoking a web service?
Explain the difference between server control and html control.
What does the .webpart file do?
How to find last error which occurred in Asp.net ?
Explain the components of web form in asp.net
Explain what are the advantages of asp.net mvc framework? : asp.net mvc
How do you open a page in a new window?
How use Xml data in ASP.net?
What are sql joins?
if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....
Give an example of cookie abuse.
How to implement globalization and localization in the use interface in .net.