Tell me how to convert a number from hexadecimal number system, written in char , to int . Ie for example:

 char c = 'A'; int code = 10; // код А 

    1 answer 1

     string hexValue = new String(c); 

    then convert so

     int decValue = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber); 

    or

     int decValue = Convert.ToInt32(hexValue, 16); 
    • thank! Strange, but at first ToInt32 didn't work for me: 3, apparently messed up) - Xambey