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