更新:2007 年 11 月
错误消息
方法“method”无法实现类型“type”的接口访问器“accessor”。请使用显式接口实现。访问器尝试实现接口时会生成此错误。必须使用显式接口实现。
示例
下面的示例生成 CS0470。
复制代码 | |
---|---|
// CS0470.cs // compile with: /target:library interface I { int P { get; } } class MyClass : I { public int get_P() { return 0; } // CS0470 public int P2 { get { return 0;} } // OK } |