{"id":253,"date":"2017-01-02T19:38:01","date_gmt":"2017-01-02T19:38:01","guid":{"rendered":"https:\/\/ibex.tech\/csharp\/?p=253"},"modified":"2022-02-17T06:24:14","modified_gmt":"2022-02-17T06:24:14","slug":"application-settings","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/c-sharp\/file-input-and-output\/application-settings","title":{"rendered":"Application Settings"},"content":{"rendered":"<p>\n\tRight click on the project in Solution Explorer and choose Properties &gt; Settings tab\n<\/p>\n<p>\n\tUse this page to create individual application settings\n<\/p>\n<p style=\"margin-left: 40px;\">\n\tScope\n<\/p>\n<p style=\"margin-left: 80px;\">\n\tTypically select &#39;User&#39;.<br \/>\n\tIf you select Application scope then Settings.Default[]&nbsp;will be read-only (save deosn&#39;t work)\n<\/p>\n<p>\n\tVisual Studio will create&nbsp;the files &quot;Settings.settings&quot; and &quot;Settings.Designer&quot;.settings that contain the singleton class Settings.\n<\/p>\n<h4>\n\tReading and writing settings<br \/>\n<\/h4>\n<h5>\n\tStore Settings<br \/>\n<\/h5>\n<pre>\r\n<code>\r\n\tProperties.Settings.Default[\"MySettingName\"] = &quot;Something to save&quot;;\r\n\tProperties.Settings.Default.Save(); \r\n<\/code><\/pre>\n<h5>\n\tRead Setttings<br \/>\n<\/h5>\n<pre>\r\n<code>\r\n\tsTemp = Properties.Settings.Default.MySettingName;\r\n<\/code><\/pre>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Right click on the project in Solution Explorer and choose Properties &gt; Settings tab Use this page to create individual application settings Scope Typically select &#39;User&#39;. If you select Application scope then Settings.Default[]&nbsp;will be read-only (save deosn&#39;t work) Visual Studio will create&nbsp;the files &quot;Settings.settings&quot; and &quot;Settings.Designer&quot;.settings that contain the singleton class Settings. Reading and writing [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-file-input-and-output"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/253\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}