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
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....
How ViewstateMac works?
What is the procedure to create the environment for asp.net? : asp.net mvc
Explain the asp.net session state modes.
What is new asp.net core?
Explain the asp.net mvc folder conventions? : asp.net mvc
Disable Mouse right click on web page in asp.net?
Is asp.net free?
What is break mode?
What kind of programming language is ASP.NET?
What is cas?
Demonstrate Render and PreRender?
What is boxing and unboxing in asp.net?
What is role-based security in asp.net?
Which is better session or viewstate?