extrahieren Wie kann ich extrahieren Bytes aus double
Typ. Ich weiß, es hat 8 Bytes, genau wie long
. Wie kann ich eine long
Variable erstellen, die die gleichen Bytes wie die double
hat.C# Wie Bytes aus Doppel
double a = 1.5;
long b = (long)a; // <- this returns 1
// i want to get this: 0 01111111111 1000000000000000000000000000000000000000000000000000
//which is 4609434218613702656 as long (I guess :))
Wie kann ich das bitte schnell machen?
Mögliche Duplikat von [Wie bekommen die Bits eines "doppelten" als "lang"] (https://stackoverflow.com/questions/4475611/how-to-get-the-bits -of-a-double-as-a-long) – harold