using System;
namespace ConsoleApplication1
{
class Test
{
public int _n;
public static Test operator + (Test x, Test y)
{
Test t = new Test();
t._n = x._n + y._n;
return t;
}
public static Test operator ++ (Test t)
{
t._n++;
return t;
}
}
class Program
{
static void Main(string[] args)
{
Test a = new Test();
a++;
Console.WriteLine(a._n);
Test b = new Test();
b++;
b++;
Console.WriteLine(b._n);
Test t = a + b;
Console.WriteLine(t._n);
}
}
}
/*
run:
1
2
3
*/