List All Members from an Assembly
using System;
using System.Reflection;
public class Test
{
public static void Main(string[] args)
{
Assembly a = null;
AssemblyName asmName;
asmName = new AssemblyName();
asmName.Name = "Test";
Version v = new Version("1.0.454.30104");
asmName.Version = v;
a = Assembly.Load(asmName);
Type test = a.GetType("Test");
Console.WriteLine("Listing all members for {0}", test);
MemberInfo[] mi = test.GetMembers();
foreach(MemberInfo m in mi)
Console.WriteLine("Type {0}: {1} ",
m.MemberType.ToString(), m);
}
}
Related examples in the same category