Enum title in string

 

Hi all,


Is there any way to get easily the string value of an ENUM parameter ?


For exemple, I create an input parameter like that :

input ENUM_SYMBOL_INFO_DOUBLE var1 = SYMBOL_ASK;

And I would like to have a string variable which contains the title of the ENUM parameters choosen by the user :

string title = ???;


Thank you !

Ghen

 

try this

string  EnumToString( 
   any_enum  value      // any type enumeration value 
   );
 
Taras Slobodyanik:

try this

It works !


Thank you :)

Reason: