本文介绍了是内部的类型从Assembly.GetExportedTypes可见的()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
Assembly.GetExportedTypes VS GetTypes
是内部类型可见,当调用了 Assembly.GetExportedTypes()
?如果没有,那么就被打了电话从装配与 InternalsVisibleToAttribute
改变行为?
Are internal types visible when a call is made to Assembly.GetExportedTypes()
? If not, then does the call being made from an assembly with an InternalsVisibleToAttribute
change the behavior?
推荐答案
GetTypes
返回程序集中的所有类型,同时 GetExportedTypes
返回类型标记为public,即:
GetTypes
returns all the types in the assembly while GetExportedTypes
returns only the types marked as public, i.e.:
public class A
将由这两种方法被返回
would be returned by both methods
class B
将仅由 GetExportedTypes
这篇关于是内部的类型从Assembly.GetExportedTypes可见的()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!