What does "=>" mean?
=> is the lambda expression operator, which indicates that the code is a lambda expression.
( param ) => expr(int x) = > { return x + 1 };
or
param => exprx=> x + 1;>
What is a Lambda expression?
* Lambda expression is replacement of the anonymous method avilable in C#2.0 Lambda expression can do all thing which can be done by anonymous method. * Lambda expression are sort and function consist of single line or block of statement.
Read More: Lambda Expressions
This "=>" means using the syntax of a lambda expression in C #.
This syntax is available with Visual Studio 2008 in .NET 3.5 (C # 3.0). This is the official MSDN documentation for lambda expressions in C # .
The above code is the same as an anonymous delegate already available with C # 2.0
Your code:
Dispatcher.BeginInvoke((Action)(() => { trace.Add(response); }));
converted to:
Dispatcher.BeginInvoke(new delegate () { trace.Add(response); });
These two codes essentially have the same semantics.