System.Reflection
When ever we compile our code in .net frame work we are getting dll , in order to see the what short of methods, constructor, parameters we are using in that method at run time we are using system.reflection. we have to use gettype(), or typeof to know details about that dll.
or we can say
System.Reflection namespace is going to work with assembly and metadata.
[code]
using System;
using System.Reflection;
static void Main(string[] args)
{
string sAssemblyName = GetValidAssembly(args);
Assembly asm = Assembly.LoadFrom(sAssemblyName);
Type[] types = asm .GetTypes();
foreach (Type t in types)
{
try
{
Console.WriteLine("Namer:" + t.FullName);
Console.WriteLine("\tIs Class = " + t.IsClass);
Console.WriteLine("\tIs Enum = " + t.IsEnum);
Console.WriteLine("\tAttributes = " + t.Attributes);
}
catch (Exception ex)
{
Console.WriteLine("ex.Message");
}
}
}
[/code]
Shivanichhabra4u, if this helps please login to Mark As Answer. | Alert Moderator