I have enum
enum TestEnum : byte
{
one = 1,
two = 2
}
I am getting name of enum by
var x = Enum.GetName(typeof(TestEnum), TestEnum.one);
Now here i am getting x = 'one'
I want to get 'TTT' (TTT is any custom name)by setting some attribute on Enum. So that when i call
var x = Enum.GetName(typeof(TestEnum), TestEnum.one);
I can get x = 'TTT'
I tried with 'DisplayNameAttribute' but not getting.