Define Delegates and Events - .Net Remoting

Define Delegates.

A delegate acts like a strongly type function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods. It is type safe since it holds reference of only those methods that match its signature. Unlike other classes, the delegate class has a signature. Delegates are used to implement event programming model in .NET application. Delegates enable the methods that listen for an event, to be abstract.

Define Events.

Events are one of the members of the class. When any noteworthy activity occurs in the application, an event is raised which sends out the message to the other part of the application which handles the event. The event can carry arguments that contain information about the event. The method which handles the event must have the same signature as the event itself. Events are commonly used in the applications with graphical user interface elements such as buttons, textbox etc. An event is triggered when any action such as mouse click occurred in the interface element. The event-based programming model can be used in the non-GUI applications such as .NET Remoting application. An event in remoting.net occurs when the state of the application changes.
What is asynchronous programming? - .Net Remoting
.Net Remoting supports asynchronous programming. In this model, a call is made to a class method while the calling program continues to execute.....
When do we use delegates in your remoting applications? - .Net Remoting
.Net Remoting - You use delegates to implement callback functions, event programming, and asynchronous programming in your remoting applications.....
What are the ways to renew lifetime leases of objects? - .Net Remoting
.Net Remoting - A client can renew the lifetime lease of an object by calling the ILease.Renew method.....
Post your comment