public static void Main()
Console.WriteLine("Hello World");
static void LateBinding(){
objAssembly = Assembly.GetExecutingAssembly();
Type classType = objAssembly.GetType("Reflection.Car");
object obj = Activator.CreateInstance(classType);
MethodInfo mi = classType.GetMethod("IsMoving");
isCarMoving = (bool)mi.Invoke(obj, null);
Console.WriteLine("Car Moving Status is : Moving");
Console.WriteLine("Car Moving Status is : Not Moving");
object[] parameters = new object[3];
mi = classType.GetMethod("calculateMPG");
MilesPerGallon = (double)mi.Invoke(obj, parameters);
Console.WriteLine("Miles per gallon is : " + MilesPerGallon);
static void assemblyinfo(){
objAssembly = Assembly.Load("mscorlib,2.0.0.0,Neutral,b77a5c561934e089");
Type[] Types = objAssembly.GetTypes();
foreach (Type objType in Types)
Console.WriteLine(objType.Name.ToString());
Attribute[] arrayAttributes =
Attribute.GetCustomAttributes(objAssembly);
foreach (Attribute attrib in arrayAttributes)
Console.WriteLine(attrib.TypeId);