예제 #1
0
파일: Tool.cs 프로젝트: Akamolyhen/C-
 public void ShowResult(DelGetResult del)
 {
     if (del != null)
     {
         del(10);
     }
     else
     {
         Console.WriteLine("委托为空");
     }
 }
예제 #2
0
        static void Main(string[] args)
        {
            /*Tool tool = new Tool();
            *  tool.ShowResultSum();
            *  tool.ShowResultMinus();*/
            Tool         tool = new Tool();
            DelGetResult del  = null;

            /*DelGetResult del = tool.ShowResultMinus;
             * del += tool.ShowResultSum;*/
            tool.ShowResult(del);
            Console.ReadKey();
        }