码迷,mamicode.com
首页 > Windows程序 > 详细

C# Properties.Settings.Default

时间:2015-10-25 15:05:41      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:

使用Properties.Settings可以保存程序运行时更改的设置。

例如,可以保存最后一次使用的ID号,当程序再次启动的时候优先使用上一次使用的ID号。

 

技术分享

 

 

读属性值:

 string DebugValue = Properties.Settings.Default.Debug;

更新属性值:

Properties.Settings.Default.Debug = "vhuichen";
Properties.Settings.Default.Save();

 

C# Properties.Settings.Default

标签:

原文地址:http://www.cnblogs.com/vhuichen/p/4908688.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!