About delegates ?

Answers were Sorted based on User's Feedback



About delegates ?..

Answer / 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

About delegates ?..

Answer / sridevi

Delegates are like function pointer in c++ with type-safe.
They can be used in 2 situations
1. callback methods
2. eventHandler

Is This Answer Correct ?    4 Yes 0 No

About delegates ?..

Answer / ravindra

delegate is a reference type which is used to encapsulate a
method with specific signature.
delegates are 2 types
1.single cast delegate
2.multi caste delegate.
Adv:
1.it will improve the performance of the application.

Is This Answer Correct ?    5 Yes 1 No

About delegates ?..

Answer / payal

Delegate hold reference to another function or method

Is This Answer Correct ?    3 Yes 1 No

About delegates ?..

Answer / amit kumar

delegates holds the reference of the function
then you can call that function through the delegate object

main benifit of delegate is that you can make difference
between class objects
you can assign the different -2 methods to different-2
object of same class

Is This Answer Correct ?    2 Yes 0 No

About delegates ?..

Answer / guest

these are just reference to the methods and delegates are
used at the bottom of events.

Is This Answer Correct ?    1 Yes 0 No

About delegates ?..

Answer / prithviraj p

Delegate is a strongly typed function pointer. A delegate
object encapsulates a reference to a method

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

How to communicate via Remote proxy with Client? a)MarshalByRef b)Marshal by Value or Any thing else?

0 Answers  


How to use ipostback?

0 Answers  


What is the main differences between asp and asp.net?

0 Answers  


Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process

1 Answers   HCL, Siebel Systems, Visual Soft,


What are ASP.NET Web Forms? How is this technology different than what is available though ASP (1.0-3.0)?

1 Answers  






How many types are there session

5 Answers   TCS,


What is session handling in a webfarm, how it can work with its limits?

0 Answers   Siebel,


Why do we need asp.net?

0 Answers  


Are there any resources for drop-in replacements for the default css that comes with the ASP.NET Website template?

0 Answers   MCN Solutions,


I am using SQLServer 2005. I have one table called Drivers. Every day thousands of records will be added in this table. I have to show all these records in my GridView with out applying ajax timer beacause we don't know the time limit when the new record come to the table. Sometimes it will add for 10 seconds some times 20 seconds. There by Please try without using timer or any other soultion apply for the table in sqlserver. But, i want to see all records immediately when new record comes in table. How? Thanks in advance... Ramesh

5 Answers  


Why asp.net is better than php?

0 Answers  


Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords). Which one is trusted and which one is untrusted?

3 Answers  


Categories