If I have duplicate values in a C# enum, saying
enum MyE {
value1 = 1,
value2 = 2,
valued = 1
}
What should be the values of the following strings?
MyE N = (MyE)1;
string V1 = N.ToString();
string V2 = GetName(MyE, 1);
Is it true that V1 and V2 must contain the same values?
What these values should be?
I haven't found anything in MSDN or here concerning such a ?dereferencing? of enums with duplicates, point me to a link, please, if I missed that.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…