How to empty a list in C#?

olive picture olive · Mar 15, 2011 · Viewed 171.8k times · Source

I want to empty a list. How to do that?

Answer

Øyvind Bråthen picture Øyvind Bråthen · Mar 15, 2011

It's really easy:

myList.Clear();