Twitter <%=Resources.labels.subscribe %>

Convert a String to Enumeration in C#

  • String myString = "one";

    enum myEnum {one, two, three};

    myEnum enumeration = (myEnum)Enum.Parse(typeof(myEnum),myString,true);

    Tags:

    Permalink |

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Intro

My name is Brent Lamborn. I´m 35 years old and I live in Nebraska. I've been coding with the .NET Framework since 2003. I'm a former Marine and I have 5 boys.


View Brent Lamborn's LinkedIn profileView Brent Lamborn's profile

Sponsored By

Categories

Tag Cloud

Blog Roll