using System;
int i = 123;
byte [] intBuff = BitConverter.GetBytes(i); // 將 int 轉換成字節數組
lob.Write(intBuff, 0, 4);
i = BitConverter.ToInt32(intBuff, 0); // 從字節數組轉換成 int
double x = 123.456;
byte [] doubleBuff = BitConverter.GetBytes(x); // 將 double 轉換成字節數組
lob.Write(doubleBuff, 0, 8);
x = BitConverter.ToDouble(doubleBuff, 0); // 從字節數組轉換成 double