Dynamic assembly introspection : Assembly Load : Assembly C# Examples


C# Examples » Assembly » Assembly Load »

 

Dynamic assembly introspection









    
using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.Threading;
using  System.Reflection;
using  System.Reflection.Emit;

public  class  MainClass
{
        public  static  void  Main()
        {
                int  x  =  10;
                Assembly  a  =  Assembly.Load("mscorlib");
                Type  t3  =  a.GetType("System.Int32");
                
                Type  t1  =  typeof(int);
                Type  t2  =  x.GetType();

                Type  t4  =  Type.GetType("System.Int32");

                Console.WriteLine(t1  ==  t2);
                Console.WriteLine(t2  ==  t3);
                Console.WriteLine(t3  ==  t4);
        }
}
    
   
  
   



Output

True
True
True


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Assembly
» Assembly Load