How to get the bytes of a long?
807603Oct 31 2007 — edited Oct 31 2007Hi,
I need an 8-byte number for my application. First I create an int and then cast it to long. After that this long number must be represented by 8 bytes, or 64 bits, in memory. As far as I know the leading zeros in its binary representation are present, even though they mean nothing. However, I need to get those 8 bytes and put them in a byte array. And I need all 8 bytes, no matter what their values are. Can anyone tell me what the easiest way to that is? Thanks.