How to get all types from an assembly using Reflection?

Raja
Posted by Raja under C# category on | Views : 4043
To get all the types (like classes) from any assembly following code snippet can be used.

 Assembly asm = Assembly.Load("MyDll"); // Name of the .dll
foreach (Type t in asm.GetTypes())
{
lblMessage.Text += t.Name + "<br />";

}


Thanks

Comments or Responses

Login to post response