It is very common requirement to share some information between all
users in any web based applications. In Asp.net you can achieve this
either from Application object or Static Object.
Both Static variable and Application objects stores data for whole life of the applications, you can say they behave like a global application variable.
Static methods gives you a better way to share any value or instance between all users rather than Application objects. Static properties maintain their values throughout the Application.
Static properties are working similar to your application object. Statics objects are fast because
Both Static variable and Application objects stores data for whole life of the applications, you can say they behave like a global application variable.
Static methods gives you a better way to share any value or instance between all users rather than Application objects. Static properties maintain their values throughout the Application.
Static properties are working similar to your application object. Statics objects are fast because
- No need to cast them & -
- They are not looking for value in a collection.
No comments:
Post a Comment