D
Daniel Bass
I've got some class which contains loads of static const int values, is
there a way that, given an int, i can quickly cast the int back to a string
representation of the const?
for eg.
MyClass contains
const int ERROR_NONE = 1
const int ERROR_NO_DRIVE = 2
const int ERROR_INSUFFICIENT_DISK_SPACE = 3
....
etc.
and given an int value of say 3, I'm able to display an error message saying
something like:
string errMsg = "Error! Code: " + ((MyClass)(nErrorCode)).ToString();
Thanks!
there a way that, given an int, i can quickly cast the int back to a string
representation of the const?
for eg.
MyClass contains
const int ERROR_NONE = 1
const int ERROR_NO_DRIVE = 2
const int ERROR_INSUFFICIENT_DISK_SPACE = 3
....
etc.
and given an int value of say 3, I'm able to display an error message saying
something like:
string errMsg = "Error! Code: " + ((MyClass)(nErrorCode)).ToString();
Thanks!