Created
September 30, 2022 08:43
-
-
Save petrsvihlik/4544262830de8b08667428087a0268ea to your computer and use it in GitHub Desktop.
Nested discard parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Func<string, string, string> action = new Func<string, string, string>((_, parameter) => | |
{ | |
string function(string x) | |
{ | |
Console.WriteLine(x); | |
return x; | |
} | |
_ = function(parameter); | |
return "whatever"; | |
}); | |
var result = action("x", "y"); | |
Console.WriteLine(result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment