<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Enum Conversion.</title>
	<atom:link href="http://vkreynin.wordpress.com/2007/10/19/enum-conversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://vkreynin.wordpress.com/2007/10/19/enum-conversion/</link>
	<description>Never stop learning.</description>
	<lastBuildDate>Fri, 18 Dec 2009 16:34:47 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: vkreynin</title>
		<link>http://vkreynin.wordpress.com/2007/10/19/enum-conversion/#comment-219</link>
		<dc:creator>vkreynin</dc:creator>
		<pubDate>Sun, 21 Oct 2007 15:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://vkreynin.wordpress.com/2007/10/19/enum-conversion/#comment-219</guid>
		<description>Omer, 

Thanks for the comment.  It&#039;s not just simpler it&#039;s also more efficient way.  When you use ToObject, you&#039;ll have an extra unboxing.  

I can&#039;t believe that I didn&#039;t put it in my blog originally because when I have to deal with Enum types in my code, I don&#039;t call ToObject, I use simple casting just like you suggested.</description>
		<content:encoded><![CDATA[<p>Omer, </p>
<p>Thanks for the comment.  It&#8217;s not just simpler it&#8217;s also more efficient way.  When you use ToObject, you&#8217;ll have an extra unboxing.  </p>
<p>I can&#8217;t believe that I didn&#8217;t put it in my blog originally because when I have to deal with Enum types in my code, I don&#8217;t call ToObject, I use simple casting just like you suggested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Omer Mor</title>
		<link>http://vkreynin.wordpress.com/2007/10/19/enum-conversion/#comment-216</link>
		<dc:creator>Omer Mor</dc:creator>
		<pubDate>Sat, 20 Oct 2007 19:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://vkreynin.wordpress.com/2007/10/19/enum-conversion/#comment-216</guid>
		<description>To convert a value to enum, I believe a simple explicit cast will work:

public Colors Value2Enum(int colorValue)
{
     return (Colors)colorValue;
}</description>
		<content:encoded><![CDATA[<p>To convert a value to enum, I believe a simple explicit cast will work:</p>
<p>public Colors Value2Enum(int colorValue)<br />
{<br />
     return (Colors)colorValue;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
