c# 16进制转10进制

在线进制转换《http://tool.oschina.net/hexconvert/ 》

一、16进制转10进制

var id = Convert.ToInt32("28de1212", 16);

//id 685642258

var id = Convert.ToInt64("28de1212", 16);

//id 685642258

二、10进制转16进制

var str16 = id.ToString("x8");

//str16 "28de1212"

猜你喜欢

转载自blog.csdn.net/Qin066/article/details/89227762