<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Comments on snippet: 'Convert a string to its respective Enum member'</title>
    <description>Snipplr comments feed</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Sat, 04 Apr 2026 13:34:35 +0000</lastBuildDate>
    <item>
      <title>mcbutterbuns said on 08/Apr/2008</title>
      <link>https://snipplr.com/view/5750/convert-a-string-to-its-respective-enum-member</link>
      <description>&lt;p&gt;&lt;p&gt;There is a simpler way than this snip:&lt;/p&gt;

&lt;p&gt;(PayTypeList)Enum.Parse(typeof(PayTypeList), "Hourly");&lt;/p&gt;

&lt;p&gt;Will through an ArgumentException (I believe) if the string is cannot be parsed into the type of enum requested.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 08 Apr 2008 16:49:14 UTC</pubDate>
      <guid>https://snipplr.com/view/5750/convert-a-string-to-its-respective-enum-member</guid>
    </item>
    <item>
      <title>paragjagdale said on 08/Apr/2008</title>
      <link>https://snipplr.com/view/5750/convert-a-string-to-its-respective-enum-member</link>
      <description>&lt;p&gt;&lt;p&gt;cool! it works and throws the ArgumentException as you said. Thanks for the tip!&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 08 Apr 2008 16:55:15 UTC</pubDate>
      <guid>https://snipplr.com/view/5750/convert-a-string-to-its-respective-enum-member</guid>
    </item>
  </channel>
</rss>
