Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何解决方案如何初始化标记为“内部”的组件的属性?我应该为 InternalsVisibleTo 属性使用什么程序集名称,否则它不会有帮助?
internal 意味着它们只能被同一程序集中的代码访问。
也就是说,您可以使用反射器将程序集撕回原始代码,将访问修饰符更改为公共,然后将其编译回来。
除非程序集被混淆;在这一点上,你是一种 SOL。