C#中进制互转

2018/05/22 238

运算 实现
10 => 2 Convert.ToString(number, 2);
10 => 8 Convert.ToString(number, 8);
10 => 16 Convert.ToString(number, 16);
2 => 10 Convert.ToInt32(string, 2);
8 => 10 Convert.ToInt32(string, 8);
16 => 10 Convert.ToInt32(string, 16);
评论