About
Pricing
Community
Teams
Start Free Trial
Log in
Tom Knowlton
asked on
10/1/2018
Question about this bit of C# syntax...
Not familiar with this syntax.
What does this line of code do? What is (s, e)? Looks like some sort of initialization for a collection of events?
public event EventHandler LoadingItemsStarted = (s, e) => { };
Select all
Open in new window
.NET Programming
C#
* LINQ
5
1
Last Comment
Tom Knowlton
8/22/2022 - Mon
Chinmay Patel
10/1/2018
Hi Tom,
Those are lambda expressions i.e. Anonymous functions.
https://docs.microsoft.com
/en-us/dot
net/csharp
/programmi
ng-guide/s
tatements-
expression
s-operator
s/lambda-e
xpressions
Regards,
Chinmay.
Chinmay Patel
10/1/2018
And s and e are the parameters for whatever you are going to put between the following curly braces.
ASKER CERTIFIED SOLUTION
it_saige
10/1/2018
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Tom Knowlton
10/1/2018
ASKER
Okay.
Thank you!
Your help has saved me hundreds of hours of internet surfing.
fblack61
Tom Knowlton
10/1/2018
ASKER
Thank you!
Those are lambda expressions i.e. Anonymous functions.
https://docs.microsoft.com
Regards,
Chinmay.