SoFunction
Updated on 2025-03-07

C# Test Reflection Performance Example


using System;
using ;
using ;
using ;
using ;
using ;
using HelloWorld.ServiceReference1;
using ;
using ;
using Interface;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Stopwatch s = new Stopwatch();
            Assembly a = ();

            //foreach (var st in ())
            //{
            //    ();
            //}

            ();
            ();
            Type t = ("HelloWorld.Test1");
            Interface1 i2 = (Interface1)((t));
            (((1, 2)));
            ();
            ();


            ();
            ();
            Interface1 i = (Interface1)("HelloWorld.Test1");
            (((1, 2)));
            ();
            ();

        }
    }
    public class Test1 : Interface1
    {
        public int Add(int a, int b)
        {
            return a + b;
        }
    }
    public interface Interface1
    {
        int Add(int a, int b);
    }
}