C# 各种进制之间相互转换 [ZT]
MessageBox.Show(Convert.ToString(12345, 2)); //10进制转换为2进制
![](/Images/OutliningIndicators/None.gif)
MessageBox.Show(Convert.ToString(12345, 8)); //10进制转换为8进制
![](/Images/OutliningIndicators/None.gif)
MessageBox.Show(Convert.ToString(12345, 16)); //10进制转换为16进制
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
MessageBox.Show(Convert.ToInt32("1100", 2).ToString());//2进制转为10进制
![](/Images/OutliningIndicators/None.gif)
MessageBox.Show(Convert.ToInt32("1100", 8).ToString());//8进制转为10进制
![](/Images/OutliningIndicators/None.gif)
MessageBox.Show(Convert.ToInt32("1100", 16).ToString());//16进制转为10进制
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)