<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technoreply &#187; C#</title>
	<atom:link href="http://www.technoreply.com/tag/c-sharp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.technoreply.com</link>
	<description></description>
	<lastBuildDate>Mon, 25 Jul 2011 19:21:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Fixing Obsolete System.Configuration.ConfigurationSettings.AppSettings in C#</title>
		<link>http://www.technoreply.com/fixing-obsolete-configurationsettings-appsettings-in-c-sharp/</link>
		<comments>http://www.technoreply.com/fixing-obsolete-configurationsettings-appsettings-in-c-sharp/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 13:54:21 +0000</pubDate>
		<dc:creator>Jevin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://technoreply.wordpress.com/?p=35</guid>
		<description><![CDATA[Okay this is a quick one. If you&#8217;re having &#8220;&#8216;System.Configuration.ConfigurationSettings.AppSettings&#8217; is obsolete: &#8216;This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings&#8217;&#8221; as error message when working with C#, then you have come to the right place for the fix. &#8230; <a href="http://www.technoreply.com/fixing-obsolete-configurationsettings-appsettings-in-c-sharp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay this is a quick one. If you&#8217;re having &#8220;<strong>&#8216;System.Configuration.ConfigurationSettings.AppSettings&#8217; is obsolete: &#8216;This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings&#8217;</strong>&#8221; as error message when working with <strong>C#</strong>, then you have come to the right place for the <strong>fix</strong>. Here we go then.</p>
<p>To <strong>fix</strong> it, just <strong>add a reference</strong> to &#8220;<strong>System.Configuration.dll</strong>&#8220;. And change from &#8220;<strong>ConfigurationSettings.AppSettings</strong>&#8221; to &#8220;<strong>ConfigurationManager.AppSettings</strong>&#8220;. (<strong>C# code example</strong> below)</p>
<p>Now if you have no idea what this gibberish above means, here is an in detail explanation. <strong>Non-noobs</strong>, please read no more. <strong>Noobs</strong>, follow the steps.</p>
<ol>
<li>Right-click on your <strong>project</strong>, look for <strong>Add Reference</strong> and click on it</li>
<li>Choose the <strong>.Net</strong> tab and search for <strong>System.Configuration</strong> on the list</li>
<li>Click on <strong>OK</strong></li>
<li>Now that the <strong>reference</strong> is added, just replace <strong>ConfigurationSettings.AppSettings</strong> with <strong>ConfigurationManager.AppSettings</strong> in your <strong>code</strong>. (<strong>C# code example</strong> below)</li>
</ol>
<p>So if your <strong>code</strong> was like:</p>
<pre style="border:1px solid #c0c0c0;margin-bottom:15px;padding:10px;">Console.WriteLine(ConfigurationSettings.AppSettings.Get("anyKey"));</pre>
<p>It should now be like:</p>
<pre style="border:1px solid #c0c0c0;margin-bottom:15px;padding:10px;">Console.WriteLine(ConfigurationManager.AppSettings.Get("anyKey"));</pre>
<p>Now that this is <strong>fixed</strong>, you can get back to work on your project. It is an <strong>easy fix</strong> as you can see, but it&#8217;s not intuitive. I had to find the fix on <a title="Obsolete ConfigurationSettings.AppSettings fix" href="http://www.aspcode.net/SystemConfigurationConfigurationSettingsAppSettings-is-obsolete.aspx" target="_blank">aspcode.net</a>. Hope this helps some of you out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technoreply.com/fixing-obsolete-configurationsettings-appsettings-in-c-sharp/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

