Storing a Lambda Expression in a Variable
Solution 1:
A lambda expression is just a delegate that often maps to one of the Func<T1, T2, ..., TResult>
variants.
Func<T1, TResult> myVar = c => _configuration = c;
Replacing TResult
and T1
with the relevant types.
That might work for you.
Solution 2:
With C# 7.0 local functions
TResult matchDuplicates (T1 c) => _configuration = c;