Re: What does "()=>" mean?
I found it. => means "goes to" in a lambda expression. I am embarrassed that I didn't look in the C# help file before I posted here. My apologies for wasting bandwidth.
Re: What does "()=>" mean?
It's C#'s version of lambda functions, also called closures or anonymous functions.
Code:
delegate int myDelegate(int number);
delegate int myDelegate2(int number1, int number2);
myDelegate del = i => i + 1;
myDelegate2 del2 = (i, j) => i + j;
int a = del(42); // returns 43
int b = del2(42, 5); // returns 47
List<string> myStrings = new List<string>();
// Add Strings
myStrings.ForEach( i => Console.WriteLine(i) );
Re: What does "()=>" mean?
see this link to understand lamda expressions .. it's a part from linq to working with data in fast and easy way
Re: What does "()=>" mean?
Quote:
Originally Posted by
ClassCoder
see
this link to understand lamda expressions .. it's a part from linq to working with data in fast and easy way
Lambda expressions existed in .NET before LINQ did, though they are used heavily when using LINQ.