c#委托使用

    public class StepArgs : EventArgs
    {
        public int m_IMax = 0;
        public int m_IStep = 0;
        public string m_StrInfo = "";
        
        public StepArgs(int max,int step,string info)
        {
            m_IMax = max;
            m_IStep = step;
            m_StrInfo = info;
        }
    }
    public delegate void StepDelegate(StepArgs args);
    /*
     //类中使用方法
     public event StepDelegate StepEvent;
     
    StepArgs args = new StepArgs(iCnt, i+1, "");
                if (StepEvent != null)
                {
                    StepEvent(args);
                }

     * 
   */

  

posted @ 2013-11-22 12:45  kuailewangzi1212  阅读(155)  评论(0编辑  收藏  举报