using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web;
using System.IO;
using System.Net;
namespace ConsoleExample
{
class LoadAssembly
{
public void LoadAssembly_FromFile()
{
Assembly Ass = System.Reflection.Assembly.LoadFrom(”D:\\Parthiban\\ConsoleExample\\CrystalDecisions.Shared.dll”);
Type Asstype = Ass.GetType();
#region Get Constructor Info
ConstructorInfo[] I = Asstype.GetConstructors();
#endregion
#region Extractiong Properties Info
PropertyInfo[] PrInfo = Asstype.GetProperties();
#endregion
#region Extracting Method Info
MethodInfo[] MeInfo = Asstype.GetMethods();
Console.WriteLine(”Return Parameter \t” + MeInfo[0].ReturnType);
Console.WriteLine(”Name \t” + MeInfo[0].Name);
Console.WriteLine(”Module \t” + MeInfo[0].Module);
Console.WriteLine(”Method Body \t” + MeInfo[0].GetMethodBody());
Console.ReadLine();
#endregion
#region Extracting Event Info
EventInfo[] EveInfo = Asstype.GetEvents();
#endregion
Console.ReadLine();
}
}
}