-
Notifications
You must be signed in to change notification settings - Fork 0
Lambda
Jasper Zanjani edited this page Aug 21, 2020
·
2 revisions
A lambda expression can have two forms, both of which use the lambda declaration operator =>
:
- Expression lambda
- Statement lambda
//Expression lambda
(input-parameters) => expression
//Statement lambda
(input-parameters) => { statements }
Anonymous event handlers can be reformulated as lambdas to reduce code complexity.
SubmitButton.Click += delegate(object sender, EventArgs e)
{
MessageBox.Show("Button Clicked");
}
// Using a (statement) lambda:
SubmitButton.Click += (s,e) => MessageBox.Show("Button Clicked");
- Newtonsoft.Json
- System.Random
- System.Threading
- System.Threading.Tasks
- Windows.Foundation
- Windows.Storage
- Windows.UI.ViewManagement
- Windows.UI.Xaml.Markup
- Dependency properties
- Markup extensions
- Namespaces
- Resource dictionaries
- SplitView
- Page ?
- Type conversion
- Grid ?
- StackPanel ?
- RelativePanel ?
- VariableSizedWrapGrid
- Canvas