简单的问题
麻烦讲讲委托,它是怎么实现的,为什么要用委托,就像在线程中我如果要调用控件就会用到委托来异步调用,最好使用自己的话组织,谢谢谢谢
[解决办法]
http://www.cnblogs.com/cntour365/archive/2008/08/29/1279757.html
这篇写的很详细
[解决办法]
class MainClass{ // Regular method that matches signature: static void SampleDelegateMethod(string message) { Console.WriteLine(message); } static void Main() { // Instantiate delegate with named method: SampleDelegate d1 = SampleDelegateMethod; // Instantiate delegate with anonymous method: SampleDelegate d2 = delegate(string message) { Console.WriteLine(message); }; // Invoke delegate d1: d1("Hello"); // Invoke delegate d2: d2(" World"); }}