Microsoft.CSharp.RuntimeBinder.Semantics.ExprFactory.CreateConcat C# (CSharp) Method

CreateConcat() public method

public CreateConcat ( EXPR op1, EXPR op2 ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONCAT
op1 EXPR
op2 EXPR
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRCONCAT
        public EXPRCONCAT CreateConcat(EXPR op1, EXPR op2)
        {
            Debug.Assert(op1 != null && op1.type != null);
            Debug.Assert(op2 != null && op2.type != null);
            Debug.Assert(op1.type.isPredefType(PredefinedType.PT_STRING) || op2.type.isPredefType(PredefinedType.PT_STRING));

            CType type = op1.type;
            if (!type.isPredefType(PredefinedType.PT_STRING))
            {
                type = op2.type;
            }

            Debug.Assert(type.isPredefType(PredefinedType.PT_STRING));

            EXPRCONCAT rval = new EXPRCONCAT();
            rval.kind = ExpressionKind.EK_CONCAT;
            rval.type = type;
            rval.flags = 0;
            rval.SetFirstArgument(op1);
            rval.SetSecondArgument(op2);
            Debug.Assert(rval != null);
            return (rval);
        }