=> operator in C#
-
I am new to C#, so any one can help me to understand the => operator in C# or give me some resource on this. Thanks in advanced.
-
I am new to C#, so any one can help me to understand the => operator in C# or give me some resource on this. Thanks in advanced.
This (=>) is called the Lambda operator. This will help you generate lambda expressions. You specify input parameters (if any) on the left side of the lambda operator =>, and you put the expression or statement block on the other side. For example, the lambda expression x => x * x specifies a parameter that’s named x and returns the value of x squared.
Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial
-
This (=>) is called the Lambda operator. This will help you generate lambda expressions. You specify input parameters (if any) on the left side of the lambda operator =>, and you put the expression or statement block on the other side. For example, the lambda expression x => x * x specifies a parameter that’s named x and returns the value of x squared.
Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial
Thanks Abhinav S so much!
-
I am new to C#, so any one can help me to understand the => operator in C# or give me some resource on this. Thanks in advanced.
-
The => operator in C# is for an example if your int is equals or more then the other int. I hope this help :D //XoulsZ
No, that's wrong. Let me tell you: => != >= !
-
I am new to C#, so any one can help me to understand the => operator in C# or give me some resource on this. Thanks in advanced.
It has something to do with Lambda expressions. It is the syntax for lambda expressions in C#. For more details read this: A Beginner's Tutorial on Basics of Delegates, Anonymous Functions and Lambda Expressions in C#[^]
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
-
I am new to C#, so any one can help me to understand the => operator in C# or give me some resource on this. Thanks in advanced.