C# => operator?
It's called the lambda operator.
b.Click += (s, e) => Log("Sender :" + s + "EventArgs " + e);
is identical to
b.Click += b_Click;
void b_Click(object sender, EventArgs e)
{
Log("Sender :" + sender + "EventArgs " + e);
}
or
b.Click += delegate(object sender, EventArgs e)
{
Log("Sender :" + sender + "EventArgs " + e);
};
=> is a lambda expression operator you can think of it as an anonymous function in javascript
in this case
ContactDetailWindow.Closed += (o, e) => { finishedCallback(contactDetailWindow.DialogResult);
it is creating a function that is being used as the handler for the closed event. The complier can infer the types of o and E since it knows the defintion of of the closed delelegate.