声明委托:delegate void func()实现委托:1. 直接赋值 声明方法:void somefunc() {/*code here*/} 赋值:func = somefunc;2. 匿名方法 func = delegate(){/*code here*/}3. lambda表达式 func = () => {/*code here*/}