代码:
BitConverter.GetBytes(ts.uTest);
BitConverter.GetBytes(ts.dTest);
BitConverter.GetBytes(ts.uTest);
生成的exe后,反编译:
public static unsafe byte[] GetBytes(double value)
{
return GetBytes(*((long*) &value));
}
public static unsafe byte[] GetBytes(long value)
{
byte[] buffer = new byte[8];
fixed (byte* numRef = buffer)
{
*((long*) numRef) = value;
}
return buffer;
}
public static unsafe double ToDoub
BitConverter.GetBytes(ts.uTest);
BitConverter.GetBytes(ts.dTest);
BitConverter.GetBytes(ts.uTest);
生成的exe后,反编译:
public static unsafe byte[] GetBytes(double value)
{
return GetBytes(*((long*) &value));
}
public static unsafe byte[] GetBytes(long value)
{
byte[] buffer = new byte[8];
fixed (byte* numRef = buffer)
{
*((long*) numRef) = value;
}
return buffer;
}
public static unsafe double ToDoub