更新:2007 年 11 月
错误消息
“property override”: 无法重写,因为“non-property”不是属性试图将非属性数据类型重写为
下面的示例生成 CS0544:
// CS0544.cs
// compile with: /target:library
public class a
{
   public int i;
}
public class b : a
{
   public override int i {   // CS0544
   // try the following line instead
   // public new int i {
      get
      {
         return 0;
      }
   }
} | |