How to use enum2int function in MSD axapta

Example of enum2int function in axapta

 SalesType salesType;  
 ;  
 salesType = SalesType::Sales;  
 info(strfmt("The value of the current sales-type element is %1",  
 enum2int(salesType)));