Property and Method

Select() 컬렉션의 모든 요소를 변환하여 새로운 시퀀스를 생성

Array Declaration

int[] numbers = new int[5]; // 5개의 int형 요소를 가지는 배열 생성

Multidimensional Array Declaration

// 2차원 배열
int[,] twoDimArray = new int[3,4];

// 3차원 배열
int[,,] threeDimArray = new int[2,3,4];

// n차원 배열
int[,,, ... ,] nDimArray = new int[length1, length2, ..., lengthN];

Array.Select(Lambda or Method)

string[] strArray = { "1", "2", "3" };
int[] intArray = strArray.Select(int.Parse).ToArray();
// { 1, 2, 3 }
// 배열의 경우
int[] sizes = Console.ReadLine().Split().Select(int.Parse).ToArray();
// 리스트의 경우
List<int> sizes = Console.ReadLine().Split().Select(int.Parse).ToList();