C#????????y???
???????????? ???????[ 2013/8/28 11:10:19 ] ????????
????????????????????????
??????????????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# ??ó???????????????洢????????????ó????????????á?????????????????????????á?????????????д??????????ν????鴿?????ú??????ó????С?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11