Samyu1's Posts
Nairaland Forum › Samyu1's Profile › Samyu1's Posts
1 (of 1 pages)
Both seperately i.e I tried ulong seperately and double seperately when I am using double I am not getting the same value as I expected the last 2-digits differ ex: 20090521003032797856 expected 00048MZBBINX8GIO getting 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000048MZBBINX8G00 any way leading zeros need to be tide up When I am using ulong I am getting integral constant is too large Thank you |
I tried ulong double and decimal everything that's not working I am getting the same problem Integral constant is too large |
Thank you seun. But that doesn't work I am getting Integral constant is too large . Actually I am trying to convert this number 20090521003032796356 and expecting output as like this 00048MZBBINX8FD0. Thank you |
I used the following code but this has stack overflow since Int64 accepts only 18-digits and I had 20-digit lenght value which need to be converted from base10 to base36 public static string Base36Encode(long value) { char[] base36Chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(); string returnValue = ""; while (value != 0) { returnValue = base36Chars[value % base36Chars.Length] + returnValue; value /= 36; } return returnValue; } Any help is appreciated Thank you in advance |
1 (of 1 pages)