Пример #1
0
 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();
        }