Delegate are essentially inline Action
's or Func<T>
. You can declare a delegate outside the scope of a method which you are running or using a lambda
expression(=>
); because you run the delegate within a method, you run it on the thread which is being run for the current window/application which is the bit in bold.
Lambda example
int AddFiveToNumber(int number)
{
var d = (int i => i + 5);
d.Invoke(number);
}