How to convert numbers between hexadecimal and decimal

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

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

17条回答
  •  长情又很酷
    2020-11-22 06:15

    String stringrep = myintvar.ToString("X");
    
    int num = int.Parse("FF", System.Globalization.NumberStyles.HexNumber);
    

提交回复
热议问题