我遇到了FxCop的问题,并且警告:Abstract types should not have constructors
。FxCop当没有新的时候,抽象类型不应该有构造函数
这是显示为许多抽象类(可能所有,我没有检查)。当我看他们大多没有新的方法,所以我认为它是编译器添加一个默认的方法。因此,要删除它,我加一个私人默认constuctor(Private Sub New()
),这则意味着所有的inherting类未能建立与错误: Class 'InheritingClass' has no accessible 'Sub New' and cannot be inherited.
这似乎很奇怪,因为FxCop的请求,没有公共的构造,但是当我删除了构建失败。
现货,并且说明是有帮助了。 – themaninthesuitcase 2010-11-26 11:42:39