2013年1月15日

6.10委托

摘要: 概念:1.委托类似于C++函数指针,但是他是类型安全的.2.委托允许将方法作为参数进行传递例:namespace ConsoleApplication1{ delegate int mydelegate(int x,int y); //委托声明 class MyDelegate { public int add(int x, int y) { return x + y; } public int sub(int x, int y) { return x - y; ... 阅读全文

posted @ 2013-01-15 17:07 msony210 阅读(85) 评论(0) 推荐(0)

导航