Adds an object to the end of the List.
문법
list.Add(item)예제
아래 값을 입력하면 예제에 즉시 반영됩니다.
var→list→new→List→Add→Console→WriteLine→string→var list = new List<int> { 1, 2, 3 };
list.Add(4);
Console.WriteLine(string.Join(", ", list)); // 1, 2, 3, 4