CSharp examples for Language Basics:Variable
Local variables must be assigned a value before they can be read.
using System;/* ww w . j a v a 2 s. c om*/ class Test { static void Main(){ //int x; //Console.WriteLine (x); // Compile-time error int[] ints = new int[2]; Console.WriteLine (ints[0]); // 0 } }