How to convert numbers between hexadecimal and decimal

前端 未结 17 1094
情歌与酒
情歌与酒 2020-11-22 05:30

How do you convert between hexadecimal numbers and decimal numbers in C#?

17条回答
  •  悲哀的现实
    2020-11-22 05:53

    Hex to Decimal Conversion

    Convert.ToInt32(number, 16);
    

    Decimal to Hex Conversion

    int.Parse(number, System.Globalization.NumberStyles.HexNumber)
    

    For more details Check this article

提交回复
热议问题