????????????????????????

??????????????2?????????????????????????????????????????????

????????????????????????????

??????“Solution Explorer”?????????????????????У?????????“Properties”??????????

??????“Solution Explorer”?????????????????????У????????????????????? .settings ????????????????????? Settings.settings??

????????????????У????????????????????“Value”????????м????????

????????ó???????????????

??????????????????????ó???????????????ó????????????????????磬??????????????????????????????????????λ?á?????????????????ó????????????????????????????????и??????????

????????ó???????????????????

??????? Microsoft ???±??????????????? XML ????????????ó???????? <AssemblyName>.exe.config ?????

??????????????????????????????????????

????<setting name="Setting" serializeAs="String">

????<value>?????????</value>

????</setting>

????????ü???????????????????

??????????????????

???????????ó???????????????????á???????ó?????????????????????????????з???????????????????????????ж?д???? C# ?п?????? Properties ?????????????á?

??????????????????

???????????????? Properties ???????????ó?????????????????????á?Properties ?????????? Properties.Settings.Default ???????????????????????á???д?????????????????????????????? IntelliSense ?в?????????????????????????????????????? System.Drawing.Color??????????????????????????????????????????????????

????this.BackColor = Properties.Settings.Default.myColor;

??????????????????????

??????ó???????????????????????????????????????ó?????????? <AssemblyName>.exe.config ????????и??????????????????????????????????????д????????κ?????????????????????ó????????????????????????????????? Settings.Save ??????????????ó???????????????????????????Щ????????? User.config ????С?

???????????д?????????????????

??????????????ò???????????????????????

????Properties.Settings.Default.myColor = Color.AliceBlue;

????????????????ó?????????????????????????????? Save ???????????′????????

????Properties.Settings.Default.Save();

??????????????????

???????Щ????£????????????ó??????????????á????磬??????????????ó????????????????????????и???????????????????????????????????????????????滻?????????????????????????????Visual Studio 2005 ????????????????????á????????????????????????????????????鴿?????á????磬?????????????????? SpecialSettings ???????????????? Properties.SpecialSettings ????????????????e?????????е????á?

????????????????????

??????“Project”???????????????“Add New Item”????????????????“Add New Item”??????????????

??????“Add New Item”???????????????У????“Settings File”?????????????

??????“Name”??????????????????????????? SpecialSettings.settings???????“Add”?????????????????????????С?

??????“Solution Explorer”?????????????????????У????μ???????????? Properties ??????С???????????????????μ????á?

?????????????κ????????????????????????????????á?????? Properties.SpecialSettings ?????????????á?

??????????

??????????У????????????? C# ??ó???????????????洢????????????ó????????????á?????????????????????????á?????????????д??????????ν????鴿?????ú??????ó????С?