Re: hex operation help
am 05.01.2008 13:00:33 von Duy Lam
Lenny wrote:
> hi
> I have a Ulong value like this 0x0001e8480003d08f
> and I need to division of the first 8 digit number with the second 8
> digit number.
> 0001e848 / 0003d08f
> in c#
> can you help me?
> thanks
> Luca
Try this code:
ulong value = 0x11223344aabbccdd;
ulong first4Bytes =value>>32;
ulong last4Bytes = value & 0x00000000ffffffff;
Console.WriteLine(value.ToString("x"));
Console.WriteLine(first4Bytes.ToString("x"));
Console.WriteLine(last4Bytes.ToString("x"));
Hope this help
--
Duy Lam Phuong