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.
我MyClass在库项目 A 中有一个公共类,该项目是使用该类的项目 B 的引用。
MyClass
项目 B 也是一个库,假设它被项目 C 引用。
是否可以MyClass仅通过引用项目 B 在项目 C 中使用,以及如何使用?
这是否可能取决于您对“使用”的定义。
类型驻留在程序集中,您必须引用它们所在的程序集才能从代码中使用它们以确保编译时检查。您还可以在运行时加载类型,通过反射与它们交互。