GetType on a class in a referenced assembly fails

后端 未结 2 549
天涯浪人
天涯浪人 2021-01-14 13:33

I have an asp.net web project that references a domain project.

From within the web project, I want to create an instance of a class from the domain project using re

2条回答
  •  臣服心动
    2021-01-14 14:22

    You can do something like this, ignoring those attributes:

    Dim myType as Type = Type.GetType("System.Linq.Enumerable")); 
    

    or:

    Dim myType as Type = Type.GetType("System.Linq.Enumerable, System.Core")); 
    

提交回复
热议问题