Пример #1
0
        public static void ImplicitInterfaceMethodThroughClass(Int32 numberIterations)
        {
            MethodTest m = new MethodTestDerived();

            for (int i = 0; i < numberIterations; ++i)
            {
                m.ImplicitInterfaceMethod();
            }
        }
Пример #2
0
        public static void Virtual(Int32 numberIterations)
        {
            MethodTest m = new MethodTestDerived();

            for (int i = 0; i < numberIterations; ++i)
            {
                m.VirtualMethod();
            }
        }
Пример #3
0
        public static void ImplicitInterfaceMethodThroughInterface(Int32 numberIterations)
        {
            MethodTest         m = new MethodTestDerived();
            IImplicitInterface t = (IImplicitInterface)m;

            for (int i = 0; i < numberIterations; ++i)
            {
                t.ImplicitInterfaceMethod();
            }
        }
Пример #4
0
        public static void ExplicitInterfaceMethod(Int32 numberIterations)
        {
            MethodTest         m = new MethodTestDerived();
            IExplicitInterface t = (IExplicitInterface)m;

            for (int i = 0; i < numberIterations; ++i)
            {
                t.ExplicitInterfaceMethod();
            }
        }