[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

Empty a List

Please let me know how I can delete all elements in a List in C#.

Thanks!
0
dshrenik
Asked:
dshrenik
1 Solution
 
oxyooCommented:
There should be a Clear() method that does what you want.
MyListVariable.Clear();

Open in new window

0
 
Kusala WijayasenaSoftware EngineerCommented:
Use the Clear() method to remove all element in the list

-Kusala
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now