Hi,
   I implemented '&' operator overloading in C# class.  But When I used
ScriptRuntime compile the expression that use '&' operator, I got a
exception 'unsupported operand type(s) for & operator overloading'.
The following is C# code.

      public static  Group operator &(Condition left, Condition right) {
            if (left == null) {
                throw new ArgumentNullException("left");
            }
            if (right == null) {
                throw new ArgumentNullException("right");
            }
             Group re = new  Group(left, right, LogicalOperator.And);
            return re;
        }

IronPython expression like this ' A.Create("Audit") ==  A.Create("Test1") &
A.CreateProperty("Sum") == A.Create("Test2") '

I tried to convert '&' to 'and'. Although no exception, I lost the left
expression.

Anyone can help me? Thanks.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to