Given below Enum,
public enum AnEnum
{
Value1,
Value2,
Value3
}
Short answer: AnEnum.Value1.ToString()
If you want to give a different details (friendlier string) to enum value, you can use "Description" attribute to enum. See this: How can I assign a string to an enum instead of an integer value in C#?
If you are dealing with enum <-> string, you may sometime want to convert string to an enum, which can be done like this:
AnEnum AnEnumValue = (AnEnum ) Enum.Parse(typeof(AnEnum ), "Value1", true);
Just for someone's benefit who is working with enum ans strings, if you want to make an array of string from enum values,
string[] arrayOfEnumStrings
= Enum.GetValues(typeof(AnEnum)).Cast<AnEnum>()
.Select(enumVal=> enumVal.ToString()).ToArray();
Here, "Enum.GetValues(typeof(Foos)).Cast()" will get you enumurator of enum values. Then "Select" will convert those enum values to string.