d1();
d2();
}
}
第五步:
public delegate void mydelegate1();
public delegate void mydelegate2(string name);
class Person
{
public static void test1()
{
Console.WriteLine("static");
}
public void test2()
{
Console.WriteLine("auto");
}
}
class Program
{
static void Main(string[] args)
{
mydelegate1 d;
d = Person.test1;