核心类:BitConverter
例子:
double a = BitConverter.Int64BitsToDouble (2342354);
Debug.Log (a);//1.15727664179883E-317
BitConverter类还有以下几个函数:
BitConverter.ToBoolean ();
BitConverter.ToChar ();
BitConverter.ToDouble ();
BitConverter.ToInt16 ();
BitConverter.ToInt32 ();
BitConverter.ToInt64 ();
BitConverter.ToSingle ();
BitConverter.ToString ();
BitConverter.ToUInt16 ();
BitConverter.ToUInt32 ();
BitConverter.ToUInt64 ();
这些函数都接收一个byte[]参数,然后返回对应类型的值。