截取字符串
word = word.Substring(word.Length - 7, 4);
转成二进制
word = "0000"+ Convert.ToString(Int32.Parse(word, System.Globalization.NumberStyles.HexNumber), 2);
16进制转10进制(int)
Int32.Parse( word , System.Globalization.NumberStyles.HexNumber )
10进制转2进制
Convert.ToString(str,2)
原文地址:https://www.cnblogs.com/z45281625/p/10579131.html
时间: 2024-10-11 10:28:03