<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-5211228043243414701.post7815827947965862153..comments</id><updated>2012-02-02T07:45:59.453+01:00</updated><category term='Personal'/><category term='AOP'/><category term='Web dev'/><category term='J2ME'/><category term='Visual Studio'/><category term='GWT'/><category term='Microsoft'/><category term='MVC'/><category term='Antipatterns'/><category term='HowTo'/><category term='.Net'/><category term='ASP.net MVC'/><category term='Apple'/><category term='Exploring JavaScript'/><category term='C++'/><category term='Software Design'/><category term='Projects'/><category term='Mac'/><category term='iOS'/><category term='Spring'/><category term='Clean Code'/><category term='Windows OS'/><category term='Android'/><category term='Unit Testing'/><category term='Design Patterns'/><category term='jQuery'/><category term='Smelly Code'/><category term='refactoring'/><category term='jFace'/><category term='interesting apps'/><category term='Software testing'/><category term='martial arts'/><category term='Software Architecture'/><category term='Java'/><category term='OSX'/><category term='Best Practices'/><category term='Google'/><category term='Open Source'/><category term='Blogging'/><category term='C#'/><category term='VBA'/><category term='RCP'/><category term='iPhone'/><category term='WCF'/><category term='Linux'/><category term='mobile dev'/><category term='Eclipse'/><category term='functional programming'/><category term='lessions learned'/><category term='annotated'/><category term='webclips'/><category term='Agile Development'/><category term='JavaScript'/><category term='Tech vids'/><category term='ASP.net'/><category term='Entity Framework'/><category term='Silverlight'/><title type='text'>Comments on Juri's TechBlog: String enumerations in C#</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.js-development.com/feeds/7815827947965862153/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html'/><author><name>Juri Strumpflohner</name><uri>https://profiles.google.com/104904743888756261987</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-Q7MhUS4Qmsc/AAAAAAAAAAI/AAAAAAAAC5k/QAy7ju1ZGXY/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-7275943913283159988</id><published>2009-05-21T22:40:43.524+02:00</published><updated>2009-05-21T22:40:43.524+02:00</updated><title type='text'>Hi,
thanks. Yes I wanted to create such an enumera...</title><content type='html'>Hi,&lt;br /&gt;thanks. Yes I wanted to create such an enumeration already multiple times but then due to time pressure I always just used string constants, which often are also enough.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/7275943913283159988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/7275943913283159988'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html?showComment=1242938443524#c7275943913283159988' title=''/><author><name>Juri Strumpflohner</name><uri>http://www.blogger.com/profile/00030320835964434266</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://juri.strumpflohner.googlepages.com/myfoto.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-7815827947965862153' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/7815827947965862153' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-677632238'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-8752949948566181815</id><published>2009-05-21T22:03:29.404+02:00</published><updated>2009-05-21T22:03:29.404+02:00</updated><title type='text'>Hello,
nice post. Thats really a good idea and it ...</title><content type='html'>Hello,&lt;br /&gt;nice post. Thats really a good idea and it would have been help full many times in the past... because I use enumerations in many places.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/8752949948566181815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/8752949948566181815'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html?showComment=1242936209404#c8752949948566181815' title=''/><author><name>Manfred</name><uri>http://www.blogger.com/profile/14884047895668798987</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03119528633831427098'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-7815827947965862153' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/7815827947965862153' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-344598541'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-6841513815927662491</id><published>2009-05-21T11:53:39.004+02:00</published><updated>2009-05-21T11:53:39.004+02:00</updated><title type='text'>Yes I know, that's true. But in that case you'll g...</title><content type='html'>Yes I know, that's true. But in that case you'll get basically just the name of the enumeration variable printed out. So the names in my case would be "C" and "M", not really expressive, but yes you could do that.&lt;br /&gt;But if you want to choose more expressive names (which is usually always better, then you have to go for the approach I described. &lt;br /&gt;For your example with the colors, the ToString() is perfectly suited.&lt;br /&gt;&lt;br /&gt;Greets to Australia :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/6841513815927662491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/6841513815927662491'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html?showComment=1242899619004#c6841513815927662491' title=''/><author><name>Juri Strumpflohner</name><uri>http://www.blogger.com/profile/00030320835964434266</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://juri.strumpflohner.googlepages.com/myfoto.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-7815827947965862153' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/7815827947965862153' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-677632238'/></entry><entry><id>tag:blogger.com,1999:blog-5211228043243414701.post-7263754567245549652</id><published>2009-05-21T11:07:15.737+02:00</published><updated>2009-05-21T11:07:15.737+02:00</updated><title type='text'>hm...
you can have string enumerations in C#

just...</title><content type='html'>hm...&lt;br /&gt;you can have string enumerations in C#&lt;br /&gt;&lt;br /&gt;just call ToString() on that enum variable&lt;br /&gt;&lt;br /&gt;EXAMPLE&lt;br /&gt;enum Colors { Red, Green, Blue, Yellow };&lt;br /&gt;Colors x = Colors.Red;&lt;br /&gt;Console.WriteLine("Color: " + x);&lt;br /&gt;Console.WriteLine("Color: " + Colors.Red);&lt;br /&gt;            &lt;br /&gt;both return the string instance&lt;br /&gt;WriteLine calls ToString implicit</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/7263754567245549652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5211228043243414701/7815827947965862153/comments/default/7263754567245549652'/><link rel='alternate' type='text/html' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html?showComment=1242896835737#c7263754567245549652' title=''/><author><name>Peter Gfader</name><uri>http://www.blogger.com/profile/07780415437484280285</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://www.gfader.com/images/gfader-peter.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.js-development.com/2009/05/string-enumerations-in-c.html' ref='tag:blogger.com,1999:blog-5211228043243414701.post-7815827947965862153' source='http://www.blogger.com/feeds/5211228043243414701/posts/default/7815827947965862153' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1204957544'/></entry></feed>
