fork(2) 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. float k = (float)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. public static implicit operator float(MyClass m)
  33. {
  34. return 3.14f;
  35. }
  36.  
  37. }
  38. }
Success #stdin #stdout 0.04s 23968KB
stdin
Standard input is empty
stdout
2147483647
-2
6.28