对于存放在.net终身变量的值? [英] Storing variable value for lifetime in .Net?

查看:140
本文介绍了对于存放在.net终身变量的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要存储存储它的生命值时间的变量值。

I want to store a variable value that store its value life time.

我知道下面的东西可以使用,但它可能有一个存储的限制。

I know the following things that can be used but it may have a storing limits.


  1. 会话

  2. 饼干

  3. 查询字符串

不过,我想存储的价值一生。

But I want to store value for lifetime.

我听说过应用程序变量,但我不知道他们的功能。所以,任何人都可以告诉我这件事,也建议我是有任何其他方式来存储价值?

I heard about "application variables", but I don't know about their functionality. So, could anyone tell me about it and also suggest me is there any other way to store values?

推荐答案

应用程序是一个对象的键值字典。应用程序状态存储在内存中的服务器上,将丢失的应用程序关闭或崩溃时。请参见获取更多信息。

Application is a key value dictionary of objects. Application state is stored in memory on the server and will be lost when application shutdown or crash. See this for more info.

如果你想存储的值的一生中,我的意思是,即使应用程序崩溃或关闭,你必须使用一个数据库(它可能是一个XML文件或文件结构...)。

If you want to store a value lifetime, I mean even when the Application crash or shutdown, you must use a database(it could be a xml file or structured file...).

这篇关于对于存放在.net终身变量的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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