Absolutely it is possible to return a value from delegate. In fact Func is a delegate that will accept parameters and return result. But, there is a problem with return value in delegate.
For example, if you look at the below code, we have a delegate that gets an integer and return a integer. The Main method is attached with 2 handlers in the same delegate. When you call the method GetValue(), it is calling all the handlers of that delegate. You run this application, you will get surprise because there will be one output and result would be 12.
Because, even if the delegate able to return value. if you have attached multiple handlers, then it will return the result only from the last attached handler.
public delegate int DelegateWithReturnValueHandler(int value);
public class DelegateWithReturnValueDemo
public DelegateWithReturnValueHandler DelegateWithReturnValueHandler = null;
public int GetValue(int value)
static void Main(string args)
DelegateWithReturnValueDemo delegateWithReturnValueDemo = new DelegateWithReturnValueDemo();
delegateWithReturnValueDemo.DelegateWithReturnValueHandler += (x) => x + 1;
delegateWithReturnValueDemo.DelegateWithReturnValueHandler += (x) => x + 2;