using System;
public class Program
{
public static void Main()
// Variable declaration
int x, y, a, b;
// Assignment Operator
x = 3;
y = 2;
a = 1;
b = 0;
// There are many mathematical operators ...
// Addition Operator
x = 3 + 4;
// Subtraction Operator
x = 4 - 3;
// Multiplication Operator
x = 10 * 5;
// Division Operator
x = 10 / 5;
// Order of operations using parentheses
x = (x = y) * (a - b);
// There are many operators used to evaluate values ...
// Equality Operator
if (x == y)
}
// Greater than Operator
if (x > y)
// Less than Operator
if (x < y)
// Greater or Equal to Operator
if (x >= y)
// There are two "conditional" operators as well that can
// be used to expand / enhance an evaluation ...
// ... and they can be combined together multiple times.
// Conditional AND Operator _
if ((x > y) && (a > b))
// Conditional OR Operator _
if ((x > y) || (a > b))
// Also, here's the in-line conditional operator we
// learned about in the previous lesson ...
string message (x == 1) ? "Car" : "Boat";
// Member access and Method invocatioin
Console.WriteLine("Hi");