상상 너머 그 무언가...

c# int Array 선언방법 본문

개발관련(Development)/유니티3D(Unity3D)

c# int Array 선언방법

Clack 2011. 10. 10. 17:27


int[] arr1 = new int[] { 3, 4, 5 }; // Declare int array
int[] arr2 = { 3, 4, 5 };           // Another
var arr3 = new int[] { 3, 4, 5 };   // Another

int[] arr4 = new int[3];            // Declare int array of zeros
arr4[0] = 3;
arr4[1] = 4;
arr4[2] = 5;