<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: More reasons never to use C# enums</title>
	<atom:link href="http://skizz.biz/blog/2004/01/20/more-reasons-never-to-use-c-enums/feed/" rel="self" type="application/rss+xml" />
	<link>http://skizz.biz/blog/2004/01/20/more-reasons-never-to-use-c-enums/</link>
	<description>Chris Stevenson's blog</description>
	<pubDate>Mon, 08 Sep 2008 12:43:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: stEvil</title>
		<link>http://skizz.biz/blog/2004/01/20/more-reasons-never-to-use-c-enums/#comment-1313</link>
		<dc:creator>stEvil</dc:creator>
		<pubDate>Thu, 04 Sep 2008 12:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://skizz.biz/blog/2004/01/20/more-reasons-never-to-use-c-enums/#comment-1313</guid>
		<description>1. Thats why you use the enums values names "ie one, two" not explicit numeric values.

2. Operations using enums should use if or switch statements. When using a switch statement use a default case, and use it to either provide a default value, or throw an exception.

3. If the value MUST be within a range, make the enum private, instantiate it in a class, and provide a property with limiting values.

Enums aren't a problem, hacks writing "fisher-price" code are</description>
		<content:encoded><![CDATA[<p>1. Thats why you use the enums values names &#8220;ie one, two&#8221; not explicit numeric values.</p>
<p>2. Operations using enums should use if or switch statements. When using a switch statement use a default case, and use it to either provide a default value, or throw an exception.</p>
<p>3. If the value MUST be within a range, make the enum private, instantiate it in a class, and provide a property with limiting values.</p>
<p>Enums aren&#8217;t a problem, hacks writing &#8220;fisher-price&#8221; code are</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Goldobin</title>
		<link>http://skizz.biz/blog/2004/01/20/more-reasons-never-to-use-c-enums/#comment-935</link>
		<dc:creator>Michael Goldobin</dc:creator>
		<pubDate>Wed, 23 Apr 2008 14:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://skizz.biz/blog/2004/01/20/more-reasons-never-to-use-c-enums/#comment-935</guid>
		<description>With the C# 3.0 it is possible to extend it with TryParse and do it nicer than Microsoft :) http://lazyloading.blogspot.com/2008/04/enumtryparse-with-net-35-extension.html</description>
		<content:encoded><![CDATA[<p>With the C# 3.0 it is possible to extend it with TryParse and do it nicer than Microsoft :) <a href="http://lazyloading.blogspot.com/2008/04/enumtryparse-with-net-35-extension.html" rel="nofollow">http://lazyloading.blogspot.com/2008/04/enumtryparse-with-net-35-extension.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
