Assembly.Load(String name) : Assembly « System.Reflection « C# / C Sharp by API






Assembly.Load(String name)

  

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);
    }
}

   
    
  








Related examples in the same category

1.Assembly.CodeBase
2.Assembly.EntryPoint
3.Assembly.EscapedCodeBase
4.Assembly.Evidence
5.Assembly.FullName
6.Assembly.GetCallingAssembly()
7.Assembly.GetCustomAttributes
8.Assembly.GetEntryAssembly()
9.Assembly.GetExecutingAssembly()
10.Assembly.GetExportedTypes
11.Assembly.GetName
12.Assembly.GetReferencedAssemblies
13.Assembly.GetTypes()
14.Assembly.GlobalAssemblyCache
15.Assembly.Load(AssemblyName name2)
16.Assembly.LoadFrom(String assemblyName)
17.Assembly.Location