Skip to content
Mario Gutierrez edited this page Jan 7, 2017 · 6 revisions

Various ways to initialize.

int[] a = {1, 2, 3};
int[] b = new int[] {1, 2, 3};
int[] c = new int[3];

Implicitly-typed

var a = new[] {1, 2, 3};

Clone this wiki locally