Better C# Anonymous Functions & Lambdas
A playful Blazor movie-trailer riff contrasts .NET web development with MVC, postbacks, state, JavaScript, and jQuery.
Transcript 1 topic
Lambda defaults and params
0:00C 12 has introduced a few small quality of life improvements for anonymous functions. Number one is default values. Now you can specify a default value for a parameter of an anonymous function or a Lambda expression to be used within that function. Secondly, is the ability to use the params keyword on parameters of that function. So now you can pass in say an array of users and parse through those in a for each loop inside your function.
So pretty sweet. A lot of these updates that are coming out are quality of life improvements, and I'm really curious which ones you're interested in. Be sure to leave a note in the comments to let me know, and I'll catch you next time.
Sign in to join in. Reading needs nothing.