何时在c#中使用Application对象 [英] when to use Application object in c#

查看:231
本文介绍了何时在c#中使用Application对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

何时在c#

推荐答案

中使用Application对象通常在整个应用程序中维护特定对象的值时使用井应用程序对象,无论用户会话还是其他任何内容。假设您有一些来自数据库的主设置,如页面大小或任何可以将其保存在应用程序对象中的设置,并且您可以在应用程序的任何页面上使用它。没有在应用程序中登录的事项,如果你想要一些基于用户配置文件的值你应该使用会话变量。
well application object is generally used when you maintain a value of particular object throughout the application regardless user session or anything. suppose you have some master settings which are coming from database like page size or anything you can save it in application object and that you can use that on any page in the application. no matters who is login in the application, if you want some values based on the user profile you should use session variable.


见下文。



应用程序对象及其使用

对应用程序状态的演练



希望有所帮助:)
See below articles.

Application object and its use
A walkthrough to Application State

Hope it helps :)


这篇关于何时在c#中使用Application对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆