更新时间:2022-03-16 06:01:35
您可以使用
You can convert an integer (32 bit (4 byte)) to a byte array using the BitConverter class.
Dim result As Byte() = BitConverter.GetBytes(-95I)
Dim b1 As Byte = result(0) '161
Dim b2 As Byte = result(1) '255
Dim b3 As Byte = result(2) '255
Dim b4 As Byte = result(3) '255