This article shows how to convert an enum value to a string value.
Updated: 3/7/2017
Now, let's say I want to display the string value of enum in some control. For that, I will have to convert Enum value to a string. The following code loops through enum and adds string values to a DropDownList.
This code converts an enum to string:
Now let's say, you have an enum string value say, "FirstName" and now you want to convert it to Enum value. The following code converts from a string to enum value, where Developer.SortingBy is of type SortFilter enumeration:
Pro WPF: Windows Presentation Foundation in .NET 3.0