C#ArrayList.Clear

Removes all elements from the List.

문법

list.Clear()

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

var
list
new
List
Clear
Console
WriteLine
var list = new List<int> { 1, 2, 3 };
list.Clear();
Console.WriteLine(list.Count);   // 0