List of classes in an assembly

前端 未结 5 1409
暗喜
暗喜 2020-12-11 19:24

I\'ve a DLL assembly, in which there are various classes. Each class has around 50-100 members and 4-5 functions. How can I create a list of all the classes and their respec

5条回答
  •  情书的邮戳
    2020-12-11 20:02

    You can get all type that inherits from Form in VB.net:

    Dim thisAsm As Assembly = Assembly.GetExecutingAssembly()
    Dim types As List(Of Type) = thisAsm.GetTypes().Where(Function(t) t.BaseType = GetType(Form)).ToList()
    

提交回复
热议问题