更新:2007 年 11 月
错误消息
add 访问器或 remove 访问器必须有一个主体
event 定义中的 add 或 remove 关键字必须有体。有关更多信息,请参见事件(C# 编程指南)。
下面的示例生成 CS0073:
// CS0073.cs
delegate void del();
class Test
{
   public event del MyEvent
   {
      add;   // CS0073
      // try the following lines instead
      // add
      // {
      //    MyEvent += value;
      // }
      remove
      {
         MyEvent -= value;
      }
      
   }
   public static void Main()
   {
   }
}