fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int k = 0;
  8. var bytes =BitConverter.GetBytes(k);
  9. string str = Convert.ToBase64String(bytes);
  10. Console.WriteLine(bytes.Length);
  11. Console.WriteLine(str);
  12. int x = BitConverter.ToInt32(Convert.FromBase64String("000000=="), 0);
  13. Console.WriteLine("{0} {1} {2}", k, x, x==k);
  14. }
  15. }
Success #stdin #stdout 0.03s 24376KB
stdin
Standard input is empty
stdout
4
AAAAAA==
0 -751546925 False