编译器错误 CS0683

更新:2007 年 11 月

错误消息

“explicitmethod”显式方法实现无法实现“method”,因为它是一个访问器

下面的示例生成 CS0683:

// CS0683.cs
interface IExample
{
   int Test { get; }
}

class CExample : IExample
{
   int IExample.get_Test() { return 0; } // CS0683
   int IExample.Test { get{ return 0; } } // correct
}