fork(3) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. private static void Main(string[] args)
  6. {
  7. int d = 2147483647;
  8.  
  9. Console.WriteLine(d);
  10.  
  11. long g = 2147483647+d;
  12.  
  13. Console.WriteLine(g);
  14.  
  15. long k = new MyClass()+new MyClass();
  16.  
  17. Console.WriteLine(k);
  18. }
  19.  
  20. public class MyClass
  21. {
  22. public static implicit operator int(MyClass m)
  23. {
  24. return 5;
  25. }
  26.  
  27. public static implicit operator long(MyClass m)
  28. {
  29. return 100;
  30. }
  31. }
  32. }
Success #stdin #stdout 0.06s 23968KB
stdin
Standard input is empty
stdout
2147483647
-2
10