Beispiel #1
0
        internal override void Emit(EmitContext ec)
        {
            ec.EmitIsInst(expression, type_operand);

            ec.ig.Emit(OpCodes.Ldnull);
            ec.ig.Emit(OpCodes.Cgt_Un);
        }
Beispiel #2
0
        private void EmitTypeAs(EmitContext ec)
        {
            Type type = base.Type;

            ec.EmitIsInst(operand, type);
            if (type.IsNullable())
            {
                ec.ig.Emit(OpCodes.Unbox_Any, type);
            }
        }
Beispiel #3
0
        void EmitTypeAs(EmitContext ec)
        {
            var type = this.Type;

            ec.EmitIsInst(operand, type);

            if (type.IsNullable())
            {
                ec.ig.Emit(OpCodes.Unbox_Any, type);
            }
        }
 internal override void Emit(EmitContext ec)
 {
     if (expression.Type == typeof(void))
     {
         ec.ig.Emit(OpCodes.Ldc_I4_0);
         return;
     }
     ec.EmitIsInst(expression, type_operand);
     ec.ig.Emit(OpCodes.Ldnull);
     ec.ig.Emit(OpCodes.Cgt_Un);
 }