参见英文答案 String representation of an Enum34个 我有这个列举 Public Enum Applications Unknown = 0 AA = 1 BB = 2 CC = 3 End EnumPrivate Const CALLING_APP As Applications= Applications.CC CALLING_APP.ToString()给了我“3”.但
我有这个列举
Public Enum Applications Unknown = 0 AA = 1 BB = 2 CC = 3 End Enum Private Const CALLING_APP As Applications= Applications.CC
CALLING_APP.ToString()给了我“3”.但我想要“CC” – 我做错了什么?
将“F”作为ToString()方法的参数传递:CALLING_APP.ToString(“F”)