/*委托因为静态相对比较简单,所以只是带过,动态相对比较实用*/
using System;
using System.Collections.Generic;
using System.Text;
namespace Delegate
{
delegate void EatDelegate(string AFood);
class Program
{
static void Main(string[] args)
{
EatDelegate deleZS = new EatDelegate(Eat);
deleZS("西瓜");
}
static void Eat(string AFood)
{
Console.WriteLine(Console.ReadLine() + " 吃 " + AFood);
}
}
}