public   delegate   void   delegateHandler();   
  public   class   Program   
  {   
        public   int   i=0;   
        public   delegateHandler   myhandle;   
        public   int   changeI   
        {   
                  get{return   i;}   
                  set{   
                          i=value;   
                          myhandle();   
                          }   
          }   
  }   
    
  public   class   otherclass   
  {   
        public   my   o;   
        public   otherclass()   
  {       o=new   my();   
  }   
  pulic   void   init()   
  {   
        o.myhandle+=new   delegateHandler(howtodeal);   
  }   
  public   void   howtodeal()   
  {   
        //你自己的处理程序 
}

 

相关文章:

  • 2021-07-08
  • 2022-01-12
  • 2022-01-16
  • 2022-01-15
  • 2021-11-30
  • 2021-12-24
  • 2022-01-17
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2022-02-23
  • 2021-12-06
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案