I want to get the string representation of the underlying type of enum.
Slow goal in the form of a system. Console color = console color.Cyan Dim actual = 'What goes here? Slow expectation = "11"
in C # words; You can capture int:
int val = (int) target; String valString = val.ToString ();
Or if you do not want a perception:
object = valv = convert.change type (target, Enum.GetUnderlyingType (typeof (ConsoleColor)); String valString = val.ToString ();
Comments
Post a Comment