<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>JMSoftware &#187; enum</title>
	<atom:link href="http://www.jmsoftware.co.uk/blog/tag/enum/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jmsoftware.co.uk</link>
	<description>Software Development</description>
	<lastBuildDate>Mon, 26 Sep 2011 13:38:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>Automatically Fill a ComboBox with an Enum</title>
		<link>http://www.jmsoftware.co.uk/blog/automatically-fill-a-combobox-with-an-enum</link>
		<comments>http://www.jmsoftware.co.uk/blog/automatically-fill-a-combobox-with-an-enum#comments</comments>
		<pubDate>Mon, 26 Jan 2009 14:31:42 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[enum]]></category>

		<guid isPermaLink="false">http://www.jmsoftware.co.uk/?p=161</guid>
		<description><![CDATA[This is a really nice little feature. If we have an enumerator, say: public enum MyEnumerator { Oranges, Apples, Hedgehogs, Laptops, Budgies, Other } Having a form with a ComboBox called comboBox1, put this in the constructor/form load etc: this.comboBox1.DataSource &#8230; <a href="http://www.jmsoftware.co.uk/blog/automatically-fill-a-combobox-with-an-enum">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is a really nice little feature.</p>
<p>If we have an enumerator, say:</p>
<p><code>public enum MyEnumerator { Oranges, Apples, Hedgehogs, Laptops, Budgies, Other }</code></p>
<p>Having a form with a ComboBox called comboBox1, put this in the constructor/form load etc:<br />
<code>this.comboBox1.DataSource = Enum.GetValues(typeof(MyEnumerator));</code></p>
<p>This fills the combobox with the values. To convert the current combobox value back into the enumerator&#8217;s value:<br />
<code>MyEnumerator selected = (MyEnumerator)this.comboBox1.SelectedValue;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jmsoftware.co.uk/blog/automatically-fill-a-combobox-with-an-enum/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>

