String path=openFileDialog1.FileName;
System.Reflection.Assembly a = System.Reflection.Assembly.LoadFrom(@path);
Type[] arrT = a.GetTypes();
listBox1.Items.Clear();
foreach (Type t in arrT)
{
listBox1.Items.Add("Namespace = " + t.Namespace);
listBox1.Items.Add("Class names = " + t.Name);
System.Reflection.MethodInfo[] arrMI = t.GetMethods();
System.Reflection.FieldInfo[] arrFi = t.GetFields();
System.Reflection.ConstructorInfo[] arrCi = t.GetConstructors();
foreach (System.Reflection.ConstructorInfo ci in arrCi)
{
listBox1.Items.Add("Contructor = " + ci.Name);
System.Reflection.ParameterInfo[] arrPI = ci.GetParameters();
foreach (System.Reflection.ParameterInfo pi in arrPI)
{
listBox1.Items.Add("Parameter = " + pi.Name);
}
}
foreach (System.Reflection.FieldInfo fi in arrFi)
{
listBox1.Items.Add("Field = " + fi.Name);
}
foreach (System.Reflection.MethodInfo mi in arrMI)
{
listBox1.Items.Add("Method = " + mi.Name);
System.Reflection.ParameterInfo[] arrPif = mi.GetParameters();
foreach (System.Reflection.ParameterInfo pif in arrPif)
{
listBox1.Items.Add("Parameter Name = " + pif.Name);
listBox1.Items.Add("Parameter DataType = " + pif.ParameterType.Name);
}
}
}
Tuesday, November 11, 2008
Explorer Your Dll
Label:
DLL Explorer,
Explorer Dll
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment