C# - What is => operator?

I have a reference to a stack object as shown below. I am aware of the "=" assignment operator and it's function. But, can I know what is the difference between assignment operator and the "=>" operator being used here?

var stackObj= new Stack<Action>();
stackObj.Push(() => Obj.calculate();
Who is Participating?
Amandeep Singh BhullarConnect With a Mentor Commented:
This is a Lambda Symbol in .net.
You can read article
Carl TawnSystems and Integration DeveloperCommented:
The => operator is used for Lambda expressions. In your case it is a parameter-less Lambda expression that calls the calculate() method of Obj.
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
sukhoi35Author Commented:
Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.