public static bool testMethod() { OperatorsTestClass4 Test = new OperatorsTestClass4(); OperatorsTestClass4 Test2 = ++Test; if ((Test.intI == 3) && (Test2.intI == 3)) { return true; } else { return false; } }
public static OperatorsTestClass4 operator ++(OperatorsTestClass4 MyInt) { OperatorsTestClass4 MC = new OperatorsTestClass4(); MC.intI = 3; return MC; }