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, 2022 in C# by pranav
• 2,590 points
235 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, 2022 by krishna
• 2,820 points

Related Questions In C#

0 votes
0 answers

What is the { get; set; } syntax in C#

I'm learning ASP.NET MVC, and while I ...READ MORE

Jun 11, 2022 in C# by krishna
• 2,820 points
196 views
0 votes
0 answers

What does <T> represent in C# syntax

What is the meaning of the following ...READ MORE

Jun 11, 2022 in C# by pranav
• 2,590 points
228 views
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, 2022 in C# by rajiv
• 1,620 points
333 views
0 votes
0 answers

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

As the title states, what are the ...READ MORE

Sep 26, 2022 in C# by krishna
• 2,820 points
180 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,140 points
5,244 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
888 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,360 points
10,235 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 Jun 21, 2022 in C# by krishna
• 2,820 points
416 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, 2022 in C# by krishna
• 2,820 points
363 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP