fork download
  1. using static System.Console;
  2. using static System.Convert;
  3. using System.Numerics;
  4. using System.Globalization;
  5.  
  6. public class Program {
  7. public static void Main() {
  8. var hex = "E365A931A000000";
  9. WriteLine(ToInt64(hex, 16));
  10. hex = "E365A931";
  11. WriteLine(ToInt32(hex, 16));
  12. hex = "E365A931A000000000";
  13. WriteLine(BigInteger.Parse(hex, NumberStyles.HexNumber));
  14. }
  15. }
  16.  
  17. //https://pt.stackoverflow.com/q/52865/101
Success #stdin #stdout 0.02s 17236KB
stdin
Standard input is empty
stdout
1024105553116266496
-479876815
-527630137305417646080