fork download
  1. using System;
  2.  
  3. struct a {
  4.  
  5. public int X {
  6. get;
  7. set;
  8. }
  9.  
  10. public static int operator +(a A, a A1) {
  11. return A.X + A1.X;
  12. }
  13. }
  14.  
  15. public class Test
  16. {
  17. public static void Main()
  18. {
  19. a x = new a();
  20. a y = new a();
  21. x.X = 4;
  22. y.X = 6;
  23. Console.WriteLine(x + y);
  24. }
  25. }
Success #stdin #stdout 0.03s 34712KB
stdin
Standard input is empty
stdout
10