Assigning to a delegate by lambda C# with Example
Lambdas can be used to create anonymous methods to assign to a delegate: Func addOne = x => x+1; Note that the explicit declaration of type is required when creating a variable this way: var addOne = x => x+1; // Does not work