지식 창고
Array 본문
int[] numbers = new int[3];
int[] numbers = new int[] { 10, 20, 30 };
int[] numbers = { 10, 20, 30 };
int[,] numbers = { {1, 2, 3}, {4, 5, 6} };
for(int i=0; i<numbers.GetLength(0); i++)
{
for(int j=0; j<numbers.GetLength(1); j++)
{
output numbers[i, j];
}
}
string[] names = {"A", "B", "C"};
foreach ( var name in names )
{
output name;
}
'프로그래밍 > C#' 카테고리의 다른 글
C#에서 메모리에 로드된 이미지를 전달하거나 C++에서 C#으로 전달 받는 방법 (0) | 2022.01.05 |
---|---|
컬렉션 & 제네릭 사용하기 (0) | 2021.11.03 |
데이터 형식 사용하기 (0) | 2021.11.02 |
event Action (0) | 2021.11.02 |
Delegate (0) | 2021.11.02 |
Comments