日期:2014-05-18 浏览次数:20919 次
[DllImport("kernel32", EntryPoint = "RtlMoveMemory")]
private static extern void CopyMemory(
    IntPtr destination, IntPtr source, int length); 
private static string aa(byte[] fbytFile) 
{ 
    double[] dbl = new double[1];
    CopyMemory(Marshal.UnsafeAddrOfPinnedArrayElement(dbl, 0), 
        Marshal.UnsafeAddrOfPinnedArrayElement(fbytFile, 0), 
        Marshal.SizeOf(typeof(double)));
    return dbl[0].ToString();
} 
private void button1_Click(object sender, EventArgs e)
{
    double[] d = new double[] { 20071009 };
    byte[] b = new byte[8];
    Buffer.BlockCopy(d, 0, b, 0, 8);
    Text = aa(b);
}