[FxCop.设计规则]1. 抽象类不应该拥有构造函数,FxCop.设,FxCop.设计,xCop.设计规,Cop.设计规则,op.设计规则,p.设计规则1,.设计规则1.,设计规则1.抽,计规则1.抽象,规则1.抽象类,则1.抽象类不,1.抽象类不应,1.抽象类不应该,.抽象类不应该拥,抽象类不应该拥有,象类不应该拥有构,类不应该拥有构造,不应该拥有构造函

本站地址:http://www.bajiao123.com

[FxCop.设计规则]1. 抽象类不应该拥有构造函数
Constructors on abstract types can only be called by derived types. Because public constructors create instances of a type, and you cannot create instances of an abstract type, an abstract type with a public constructor is incorrectly designed.How to Fix Violations
To fix a violation of this rule, either make the constructor protected, or do not declare the type as abstract.
When to Exclude Messages
Do not exclude a message from this rule.
Example Code
The following example contains an abstract type that violates this rule, and an abstract type that is correctly implemented.
[C#]
using System;
本站地址:http://www.bajiao123.com

