I try to check the contents of the assembly and find in it all the classes that are directly or indirectly obtained from Windows.Forms.UserControl.
I'm doing it:
Assembly dll = Assembly.LoadFrom(filename); var types = dll.GetTypes().Where(x => x.BaseType == typeof(UserControl));
But it gives an empty list, because none of the classes directly extends UserControl. I don’t have enough understanding to do it quickly, and I would prefer not to write a recursive function if I don’t need it.
reflection c #
captncraig
source share