fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. ulong k = 109775241457192755;
  8. string str = Convert.ToBase64String(BitConverter.GetBytes(k));
  9. Console.WriteLine(str);
  10. ulong x = BitConverter.ToUInt64(Convert.FromBase64String(str), 0);
  11. Console.WriteLine("{0} {1} {2}", k, x, x==k);
  12. }
  13. }
Success #stdin #stdout 0.03s 28256KB
stdin
Standard input is empty
stdout
M08wIAAAhgE=
109775241457192755 109775241457192755 True