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.
我正在尝试为我的应用程序编写单元测试,并希望我的原型类实现接口。最好将它们与 c# 类一起生成,但我找不到这样做的方法。有办法吗?
protogen 工具编写标准的部分类定义。这使得在第二个类文件中添加接口变得容易:
namespace Foo { partial class Bar : IWhatever {...} }