我們會使用BitConverter
在BitConverter中有一函數GetBytes()
此函數有10種版本~
每個版本都只有一個參數~
用法如下:
byte_array = BitConverter.GetBytes(value)傳入一個參數並將其轉為Byte陣列傳回
其中value可以為以下型態:
Boolean, Char, Int16, Int32, Int64, UInt16, UInt32, UInt64, Single, Double
| 下一頁 > |
|---|
byte_array = BitConverter.GetBytes(value)傳入一個參數並將其轉為Byte陣列傳回
| 下一頁 > |
|---|