public static void Main()
        {
            var instance = new InstanceMethodSubstitutions();

            instance.TestSimpleCallsite();
            instance.TestCallOnInstance();
            instance.TestInstanceMethodWithoutSubstitution();
            instance.TestPropagation();
            instance.TestStaticPropagation();
            instance.TestVirtualMethod();
        }
예제 #2
0
        void TestInstanceMethodWithoutSubstitution()
        {
            InstanceMethodSubstitutions ims = this;

            if (ims.InstanceMethodWithoutSubstitution())
            {
                InstanceMethodWithoutSubstitution_Reached1();
            }
            else
            {
                InstanceMethodWithoutSubstitution_Reached2();
            }
        }