First Definition
Delegate is a class that can hold a reference to a method or a function.
Event works with source and listener methodology. So, listeners who are interested in receiving some events they subscribe to the source. Once the subscription is done the source rises events to its entire listener when needed.
Now Difference
1. Actually, events use delegates in bottom. But they add an extra layer on the delegates. thus forming the publisher and subscriber model.
2. As delegates are function to pointers they can model across any clients. So any of the clients can add or remove events, which can be pretty confusing. But event give the extra protection by adding the layer and making it a publisher and subscriber model.
More important .NET Questions & Answer
Interviews5 answers
5 Answers
Elias HossainPosted Feb 22, 2008, 10:17 PM EST
First Defination
Delegate is a class that can hold a reference to a method or a function.
Event works with source and listener methodology. So, listeners who are interested in receiving some events they subscribe to the source. Once the subscription is done the source rises events to its entire listener when needed.
Now Difference
1. Actually, events use delegates in bottom. But they add an extra layer on the delegates. thus forming the publisher and subscriber model.
2. As delegates are function to pointers they can model across any clients. So any of the clients can add or remove events, which can be pretty confusing. But event give the extra protection by adding the layer and making it a publisher and subscriber model.
More important .NET Questions & Answer
Delegate is a class that can hold a reference to a method or a function.
Event works with source and listener methodology. So, listeners who are interested in receiving some events they subscribe to the source. Once the subscription is done the source rises events to its entire listener when needed.
Now Difference
1. Actually, events use delegates in bottom. But they add an extra layer on the delegates. thus forming the publisher and subscriber model.
2. As delegates are function to pointers they can model across any clients. So any of the clients can add or remove events, which can be pretty confusing. But event give the extra protection by adding the layer and making it a publisher and subscriber model.
More important .NET Questions & Answer
Elias HossainPosted Feb 22, 2008, 10:17 PM EST
First Defination
Delegate is a class that can hold a reference to a method or a function.
Event works with source and listener methodology. So, listeners who are interested in receiving some events they subscribe to the source. Once the subscription is done the source rises events to its entire listener when needed.
Now Difference
1. Actually, events use delegates in bottom. But they add an extra layer on the delegates. thus forming the publisher and subscriber model.
2. As delegates are function to pointers they can model across any clients. So any of the clients can add or remove events, which can be pretty confusing. But event give the extra protection by adding the layer and making it a publisher and subscriber model.
More important .NET Questions & Answer
Delegate is a class that can hold a reference to a method or a function.
Event works with source and listener methodology. So, listeners who are interested in receiving some events they subscribe to the source. Once the subscription is done the source rises events to its entire listener when needed.
Now Difference
1. Actually, events use delegates in bottom. But they add an extra layer on the delegates. thus forming the publisher and subscriber model.
2. As delegates are function to pointers they can model across any clients. So any of the clients can add or remove events, which can be pretty confusing. But event give the extra protection by adding the layer and making it a publisher and subscriber model.
More important .NET Questions & Answer
Elias HossainPosted Feb 22, 2008, 10:16 PM EST
First Defination
Delegate is a class that can hold a reference to a method or a function.
Event works with source and listener methodology. So, listeners who are interested in receiving some events they subscribe to the source. Once the subscription is done the source rises events to its entire listener when needed.
Now Difference
1. Actually, events use delegates in bottom. But they add an extra layer on the delegates. thus forming the publisher and subscriber model.
2. As delegates are function to pointers they can model across any clients. So any of the clients can add or remove events, which can be pretty confusing. But event give the extra protection by adding the layer and making it a publisher and subscriber model.
More important .NET Questions & Answer
Delegate is a class that can hold a reference to a method or a function.
Event works with source and listener methodology. So, listeners who are interested in receiving some events they subscribe to the source. Once the subscription is done the source rises events to its entire listener when needed.
Now Difference
1. Actually, events use delegates in bottom. But they add an extra layer on the delegates. thus forming the publisher and subscriber model.
2. As delegates are function to pointers they can model across any clients. So any of the clients can add or remove events, which can be pretty confusing. But event give the extra protection by adding the layer and making it a publisher and subscriber model.
More important .NET Questions & Answer
Elias HossainPosted Feb 22, 2008, 10:15 PM EST
You can manage the state of the application in ASP.NET in the following two major category.
1) Client-side state management
Cookies
View State
Hidden Fields
Query String
2) Server-side state management
Application State Object
Session State Object
Database support
PrabhuPosted Feb 13, 2008, 10:09 AM EST