Hey guys.
I have worked with enums for some time, but i ran in to a little problem..
So i have the Enum:
and i have a function that returns 1, 0 or 255, like this:
and i need the function to return NOT the integer, but the message that is in MyStuff
for example:
how can i do this ?
I have worked with enums for some time, but i ran in to a little problem..
So i have the Enum:
VB.NET:
Public Enum MyStuff As Byte
this_is_zero = 0
omg_this_is_one = 1
YourAss = 255
End Enum
and i have a function that returns 1, 0 or 255, like this:
VB.NET:
Public Shared function some_func()
return 1 ' this actually is dinamicaly generated value, by complex code ^_^
end function
and i need the function to return NOT the integer, but the message that is in MyStuff
for example:
VB.NET:
Dim the_text_value As String = MyStuff(some_func()) ' this returns not "1", but "omg_this_is_one"
how can i do this ?