程序重新启动的节能状态 [英] saving state between program restarts

查看:110
本文介绍了程序重新启动的节能状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何可以声明其将节省刺痛永远变量?

How can I declare a variable which would save sting forever?

我的意思是,如果用户关闭并重新启动该程序,该字符串值不丢失。

I mean if the user closes and restarts the program, this string value is not lost.

如何才能做到这一点?

推荐答案

有许多不同的方式来存储状态的应用程序。这种方法实际上取决于数据的存放和其他要求的种类

There are a number of different ways to store state for an application. The approach really depends on the type of data you are storing and other requirements

选项

  • 使用内置到.NET的设置类
    • <一个href="http://msdn.microsoft.com/en-us/library/aa730869%28v=VS.80%29.aspx">http://msdn.microsoft.com/en-us/library/aa730869(v=VS.80).aspx
    • Use the Settings classes built into .NET
      • http://msdn.microsoft.com/en-us/library/aa730869(v=VS.80).aspx

      这篇关于程序重新启动的节能状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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