What does the syntax in C mean

0 votes
I only recently discovered this syntax in some of the discussions on this site, but Google and other search engines tend to ignore anything other than letters and numbers in searches, making it impossible to find "=>."

So, could someone please explain what it is and how it is used?
Jun 11 in C# by pranav
• 2,320 points
7 views

1 answer to this question.

0 votes

Here's a simple MSDN example.

delegate int del(int i);
del myDelegate = x => x * x;
int j = myDelegate(5); //j = 25

The input parameters are anything before the =>, and the expression is everything after the =>. Multiple input parameters are possible. Linq makes extensive use of lambdas.

answered Jun 14 by krishna
• 1,340 points

Related Questions In C#

0 votes
1 answer

What are the differences between C, C# and C++ in terms of real-world applications?

C is a bare-bones, straightforward, and clean ...READ MORE

answered May 30 in C# by rajiv
• 1,620 points
19 views
0 votes
1 answer

What is the best C# to VB.net converter

Telerik has a solid SharpDevelop-based converter that ...READ MORE

answered May 30 in C# by rajiv
• 1,620 points
19 views
0 votes
1 answer
0 votes
1 answer

What is the difference between C# and .NET?

C# is a programming language, and.NET refers ...READ MORE

answered Jun 7 in C# by pranav
• 2,320 points
9 views
0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,100 points
4,466 views
0 votes
1 answer

Deploy my Windows 10 IOT core application locally!

Of course, you, can! That is, in ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
499 views
+6 votes
16 answers

How do backend of these really cool games work?

Most of the games these days don't ...READ MORE

answered Jul 19, 2018 in Career Counselling by Kalgi
• 52,350 points
7,250 views
0 votes
1 answer
0 votes
1 answer

What does the extension method do in c# and why do you need it

Extension Methods allow you to add additional ...READ MORE

answered 4 days ago in C# by krishna
• 1,340 points
8 views
0 votes
1 answer

How do I turn a C# object into a JSON string in .NET

Newtonsoft.json can be used to accomplish this. ...READ MORE

answered Jun 13 in C# by krishna
• 1,340 points
9 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP