The general form of initialization is shown here:
type var = value;
using System; class MainClass { public static void Main() { int x; // declares a variable int y; // declares another variable x = 100; // this assigns 100 to x Console.WriteLine("x contains " + x); y = x / 2; Console.Write("y contains x / 2: "); Console.WriteLine(y); } }
x contains 100 y contains x / 2: 50