Microsoft.CSharp.RuntimeBinder.Semantics.CType.isPredefType C# (CSharp) Méthode

isPredefType() public méthode

public isPredefType ( PredefinedType pt ) : bool
pt PredefinedType
Résultat bool
        public bool isPredefType(PredefinedType pt)
        {
            if (IsAggregateType())
                return AsAggregateType().getAggregate().IsPredefined() && AsAggregateType().getAggregate().GetPredefType() == pt;
            return (IsVoidType() && pt == PredefinedType.PT_VOID);
        }
        public bool isPredefined()

Usage Example

        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);
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.CType::isPredefType