Check out example codes for "c# lambda if statement". It will help you in understanding the concepts better.

Code Example 1

int input = new Random().Next(-5, 5);

//normal if-statement
string classify;
if (input >= 0)
{
    classify = "nonnegative";
}
else
{
    classify = "negative";
}

//lambda if-statement (assignment)
classify = input >= 0 ? "nonnegative" : "negative";

Learn ReactJs, React Native from akashmittal.com