One-dimensional Arrays
int[] a = new int[3];
int[] b = new int[] {3, 4, 5};
int[] c = {3, 4, 5};
SomeClass[] d = new SomeClass[10];// Array of referencesSomeStruct[] e = new
SomeStruct[10];// Array of values (directly in the array)
int len = a.Length; // number of elements in a
Next
int[] a = new int[3];
int[] b = new int[] {3, 4, 5};
int[] c = {3, 4, 5};
SomeClass[] d = new SomeClass[10];// Array of referencesSomeStruct[] e = new
SomeStruct[10];// Array of values (directly in the array)
int len = a.Length; // number of elements in a
Next
No comments:
Post a Comment