Answers for "how to get the name of an element in enum"

C#
0

Get Enum Name

//Option 1:
string m = Enum.GetName(typeof(MyEnumClass), value);
//Option 2:
string n = nameof(MyEnumClass.Value);
Posted by: Guest on June-07-2021

Code answers related to "how to get the name of an element in enum"

C# Answers by Framework

Browse Popular Code Answers by Language