About delegates ?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Answer / payal
Delegate hold reference to another function or method
| Is This Answer Correct ? | 3 Yes | 1 No |
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 |
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 |
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 |
Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
How does viewstate work?
List of interview questions collections at www.dpoint.weebly.com
What r the remotable objects. and how u make an application remotable
What is is post back property in asp net?
What is the result when the Web Form containing the following line is complied and executed? <asp:Button id=?thebutton? onClick=?theEvent? /> a) The button control is created; theEvent is the click event handler. b) Compiler error; the control must be set to runat=?server?. c) Compiler error; onClick is not a valid attribute. d) Runtime Exception; the control must be set to runat=?server?.
If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?
What are ASP.NET Web Forms? How is this technology different than what is available though ASP (1.0-3.0)?
Are there resources online with tips on asp to asp.net conversions?
what is the jit? what is the type of jit and purpose of it>
What is break mode?
What is application variable and when it is initialized ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)