Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


About delegates and events?

Answers were Sorted based on User's Feedback



About delegates and events?..

Answer / anil chauhan

In C# delegate is a class which contain the referance of a
function. or we can say that it is an function pointer.

and Event are the action performed by the user such as
mouse click elc.

Is This Answer Correct ?    6 Yes 0 No

About delegates and events?..

Answer / kishoreg

Delegates in C#
If we look at C++ there is a feature called callback
function. This feature uses Pointers to Functions to pass
them as parameters to other functions. Delegate is a
similar feature but it is more type safe, which stands as a
stark contrast with C++ function pointers. A delegate can
hold reference/s to one more more functions and invoke them
as and when needed.
Any delegate is inherited from base delegate class of .NET
class library when it is declared. This can be from either
of the two classes from System.Delegate or
System.MulticastDelegate
If the delegate contains a return type of void, then it is
automatically aliased to the type of
System.MulticastDelegate

Events in c#
Delegate usefulness does not just lie in the fact that it
can hold the references to functions but in the fact that
it can define and use function names at runtime and not at
compile time. A large goal of design delegates is their
applicability in events model of .Net. Events are the
actions of the system on user manipulations (e.g. mouse
clicks, key press, timer etc.) or any event triggered by
the program

Example can be seen at
http://www.codersource.net/csharp_delegates_events.html

Is This Answer Correct ?    6 Yes 2 No

Post New Answer

More C Sharp Interview Questions

Why can?t you specify the accessibility modifier for methods inside the interface?

3 Answers   Mind Tree, Siebel Systems,


Does unity require coding?

0 Answers  


If a.equals(b) is true then a.gethashcode & b.gethashcode must always return same hash code.

0 Answers  


What is extension method in c sharp?

0 Answers  


What are annotations in c#?

0 Answers  


What is xslt in c#?

0 Answers  


What is callback delegate in c#?

0 Answers  


What is difference between first and firstordefault?

0 Answers  


Explain the difference between const and static read-only?

0 Answers  


How long has c# been around?

0 Answers  


Can we have the method in drived class with the same name which is there in base class?

6 Answers   TCS,


what is the need of using interface in program ex:if we have a program like this interface1() { void method1(); void method(); } class a1 : interface1 { a1 b = new b(); b.method1(); b.method2(); } so without using interface also we can achieve this then wat is the need to use the interface? plz give me the answer

1 Answers  


Categories