MSDN对委托的定义如下:The delegate keyword is used to declare a reference type that can be used to encapsulate a named or an anonymous method. Delegates are similar to function pointers in C++; however, delegates are type-safe and secure。对于这样的定义,我们可以了解到委托是一种引用,就跟C++中的函数指针一样,只是委托比指针更加安全,不会发生那种指向不正确的内存地址这样的错误。
Copyright 2001-2010, www.comprg.com.cn, All Rights Reserved 京ICP备14022230号-1,电话/传真:010-82561037 82561614 ,Mail:gaojian@comprg.com.cn
地址:北京市海淀区远大路20号宝蓝大厦E座704,邮编:100089