我正在寻找一种解决方案来获取枚举的完整字符串。
例子:
Public Enum Color
{
Red = 1,
Blue = 2
}
Color color = Color.Red;
// This will always get "Red" but I need "Color.Red"
string colorString = color.ToString();
// I know that this is what I need:
colorString = Color.Red.ToString();
那么有解决办法吗?