In C#12, you can now define default values for parameters on lambda expressions. The syntax and rules are the same as adding default values for arguments to any method or local function.For example:
var addWithDefault = (int addTo = 2) => addTo + 1; addWithDefault(); // 3 addWithDefault(5); // 6
Prior to C# 12 you needed to use a local function or the unwieldy DefaultParameterValue from the System.Runtime.InteropServices namespace to provide a default value for lambda expression parameters.