C#/공부기록

[C#] List<T>

프디 2023. 1. 14. 23:32

 

ㆍList<T>

- 동적 크기조절 가능한 배열

사용법

using System.Collections.Generic;

List<int> list = new List<int>();

<예제>

using System.Collections.Generic;
 
class Program
{
    static void Main()
    {
        List<int> list = new List<int>();
 
        list.Add(1);
        list.Add(2);
        list.Add(3);
        list.Add(4);
    }
}