Thursday 6 September 2007

Instantiating arrays

Always seem to forget the syntax for instantiating arrays in code:

int [] numbers = new int[] {3,1,4};
string [] names = new string[] {"Tom", "Dick", "Harry"};