public delegate void MessageHandle(string content); public class Student { public event MessageHandle OnGoto; public void GoToSchool() { if (OnGoto != null) { OnGoto("上学去咯"); } } } class Program { static void Main(string[] args) { Student st = new Student(); st.OnGoto += new MessageHandle(st_OnGoto); st.GoToSchool(); Console.Read(); } static void st_OnGoto(string content) { Console.Write(content); } }