Ternary Operator:

CSharp · Console

/Program.cs

using System;
					
public class Program
{

public static void Main()

{
int x = 20, y = 10;

var result = x > y ? "x is greater than y" : "x is less than y";

Console.WriteLine(result);
}
}
;