Are internal types visible from Assembly.GetExportedTypes()? [duplicate]

自古美人都是妖i 提交于 2019-12-14 02:32:03

问题


Possible Duplicate:
Assembly.GetExportedTypes vs GetTypes

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?


回答1:


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

would only be returned by GetExportedTypes



来源:https://stackoverflow.com/questions/5384975/are-internal-types-visible-from-assembly-getexportedtypes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!