public static bool testMethod() { OperatorsTestClass18 Test1 = new OperatorsTestClass18(); OperatorsTestClass18 Test2 = new OperatorsTestClass18(); Test2.intI = 3; OperatorsTestClass18 Test = Test1 ^ Test2; if (Test.intI == 5) { return true; } else { return false; } }
public static OperatorsTestClass18 operator ^(OperatorsTestClass18 MyInt, OperatorsTestClass18 MyInt2) { OperatorsTestClass18 MC = new OperatorsTestClass18(); MC.intI = MyInt.intI + MyInt2.intI; return MC; }