public static void SwabDouble(ref double value)
{
byte[] bytes = BitConverter.GetBytes(value);
int[] ints = new int[2];
ints[0] = BitConverter.ToInt32(bytes, 0);
ints[0] = BitConverter.ToInt32(bytes, sizeof(int));
SwabArrayOfLong(ints, 2);
int temp = ints[0];
ints[0] = ints[1];
ints[1] = temp;
Buffer.BlockCopy(BitConverter.GetBytes(ints[0]), 0, bytes, 0, sizeof(int));
Buffer.BlockCopy(BitConverter.GetBytes(ints[1]), 0, bytes, sizeof(int), sizeof(int));
value = BitConverter.ToDouble(bytes, 0);
}