internal interface IFormView
    {
        abstract event UpdateCommandEventHandler UpdateCommand;        ViewController Controller { get; }        System.Windows.Forms.Form Form { get; }        IFormPanel TaskPanel { get; }               public delegate void UpdateCommandEventHandler(object sender, EventArgsViewCommand e);
      
    }错误:
UpdateCommandEventHandler  接口不能声明类型,应怎么改?

解决方案 »

  1.   

    把 public delegate void UpdateCommandEventHandler(object sender, EventArgsViewCommand e);
    移出来。
      

  2.   

    abstract event UpdateCommandEventHandler UpdateCommand;=>event UpdateCommandEventHandler UpdateCommand;
      

  3.   

    移出来会有更多错误,
    错误 CS0426: 类型“Lighthouse.LmsExpress.AppView.IFormView”中不存在类型名称“UpdateCommandEventHandler”
      

  4.   

    internal interface IFormView
        {
            //abstract event UpdateCommandEventHandler UpdateCommand;
            event UpdateCommandEventHandler UpdateCommand;        ViewController Controller { get; }        System.Windows.Forms.Form Form { get; }        IFormPanel TaskPanel { get; }               //public delegate void UpdateCommandEventHandler(object sender, EventArgsViewCommand e);
          
        }
        public delegate void UpdateCommandEventHandler(object sender, EventArgsViewCommand e);改成这样,报错
      

  5.   

    从接口派生的类引用了 UpdateCommandEventHandler
      

  6.   

    caozhy 大侠派生类有用UpdateCommandEventHandler 这个功能,移出来也不行
      

  7.   

    派生类只要 using 包含 UpdateCommandEventHandler 定义的命名空间就可以用。