Multicast Delegates must have a return type of void. Why?
问题 Multicast Delegates must have a return type of void Otherwise it will throw an exception. I want to know whats the reason behind it, what if multiple methods could have a same return type as of a delegate ? 回答1: The premise is wrong; it works fine: Func<int> func = delegate { Console.WriteLine("first part"); return 5; }; func += delegate { Console.WriteLine("second part"); return 7; }; int result = func(); That is a multicast delegate with a non-void result, working fine. You can see from the