What are delegates?where are they used



What are delegates?where are they used..

Answer / kirti

A delegate defines a reference type that can be used to encapsulate a method with a specific signature. A delegate instance encapsulates a static or an instance method. Delegates are roughly similar to function pointers in C++; however, delegates are type-safe and secure.

When do you use virtual keyword ?.

When we need to override a method of the base class in the sub class, then we give the virtual keyword in the base class method. This makes the method in the base class to be overridable. Methods, properties, and indexers can be virtual, which means that their implementation can be overridden in derived classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

Explain the difference between viewbag and viewdata in mvc?

0 Answers  


what is mean by versioning? Please answer me. Advance thanks.

2 Answers   Excel,


What is the use of viewmodel in mvc?

0 Answers  


Does the .NET Framework have in-built support for serialization?

2 Answers  


I can't be bothered with all this CAS stuff. Can I turn it off

1 Answers  






What is display mode in mvc?

0 Answers  


What is Attribute Routing in ASP.Net MVC?

0 Answers  


When using razor views, do you have to take any special steps to protect your asp.net mvc application from cross site scripting (xss) attacks?

0 Answers  


Is it possible to cancel filter execution?

0 Answers  


Which is the root namespace for fundamental types in .net framework?

0 Answers  


What is the difference between tempdata and viewbag?

0 Answers  


Define .NET architecture ?

3 Answers   TCS,


Categories