c# 托举
`using System;
namespace lesoo3{
public delegate void Something (string name);
public Student(string name){
public void Do (Something something){
something(name);
}
public Student(string name){
this.name=name;
}
pravate string name;
}
public class Teacher {
public void Hungry(){
Student s= new Student(“wang”)
//创建委托变量
Something a= new Something(A);
s.Do(a);
public void A (string name){
Console.WriteLine(“hello”+name);
}
}
class MainClass{
public static void Main(string[] args){
Teacher t=new teacher();
t.Hungry();
}
}
`