public static OperatorsTestClass44 operator &(int MyInt, OperatorsTestClass44 MyInt2) { OperatorsTestClass44 MC = new OperatorsTestClass44(); MC.intI = MyInt + MyInt2.intI + 1; return MC; }
public static bool testMethod() { OperatorsTestClass44 Test1 = new OperatorsTestClass44(); OperatorsTestClass44 TestClass1 = Test1 & 1; OperatorsTestClass44 TestClass2 = 1 & Test1; if ((TestClass1.intI == 3) && (TestClass2.intI == 4)) { return true; } else { return false; } }
public static OperatorsTestClass44 operator &(OperatorsTestClass44 MyInt, int MyInt2) { OperatorsTestClass44 MC = new OperatorsTestClass44(); MC.intI = MyInt.intI + MyInt2; return MC; }