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

What is meant by bootstrap in mvc5?

0 Answers  


What is the difference between .net core and .net framework?

0 Answers  


Is it possible to combine asp.net webforms and asp.mvc and develop a single web application?

0 Answers  


How does assembly versioning work?

1 Answers  


How we can call a javascript function on the change of a dropdown list in mvc?

0 Answers  






Describe the gac in the .net framework.

0 Answers  


How route table has been created in asp.net mvc?

0 Answers  


how do you mark a property as required? For example, for a project, the name is a required field.

0 Answers   Microsoft,


What is the advantage of using asp.net routing?

0 Answers  


What is NonActionAttribute ?

0 Answers   Cognizant,


How OS come to know whether to load the .net framework when we run an .exe created using .Net framework?

0 Answers   MCN Solutions,


What is RouteConfig.cs in ASP.Net MVC 4?

0 Answers  


Categories