I wrote two functions and disassembled them using Reflector:
.method private hidebysig static bool CompareWithIs(class ConsoleApplication1.A x) cil managed
{.maxstack 2
.locals init ([0] bool flag)
L_0000: nopL_0001: ldarg.0
L_0002: isinst ConsoleApplication1.BL_0007: ldnullL_0008: cgt.unL_000a: stloc.0
L_000b: br.s L_000dL_000d: ldloc.0
L_000e: ret}private static bool CompareWithIs(A x)
{return (x is B);
} |