定义类: public class AttributeControlMap : ApplicationSettingsBase { [UserScopedSetting] [DefaultSettingValue("")] public string Atrribute { get; set; } [UserScopedSetting] [DefaultSettingValue("textbox")] public string Control { get; set; } }使用:
AttributeControlMap acm = new AttributeControlMap(); acm.Control = "1"; acm.Atrribute = "1"; acm.Save(); acm.Reload();
状态保存在:
C:\Documents and Settings\Administrator\Local Settings\Application Data\xxxxxxxxxxx\xxxxxx._Url_x1odtowmx4d2zciqk33d34eaadio3jts\1.0.0.0 user.config文件了。嘿嘿!