小技 |
uint numver = 1; byte[] byteArray = BitConverter.GetBytes(number);
var byteArray = new byte {0,1,2,3}; uint dwValue = BitConverter.ToUInt32(byteArray, 0);
byte[] byteArray = text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries) .Select((x) => Convert.ToByte(x, 16)) .ToArray();
string.Join(",", byteArray.Select(x => x.ToString("X2")));