Solved

Empty a List

Posted on 2011-09-05
2
255 Views
Last Modified: 2012-05-12
Please let me know how I can delete all elements in a List in C#.

Thanks!
0
Comment
Question by:dshrenik
2 Comments
 
LVL 10

Accepted Solution

by:
oxyoo earned 500 total points
ID: 36486609
There should be a Clear() method that does what you want.
MyListVariable.Clear();

Open in new window

0
 
LVL 11

Expert Comment

by:Kusala Wijayasena
ID: 36486620
Use the Clear() method to remove all element in the list

-Kusala
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
c# string handling 1 27
Some issue on SecurityCRT 5 25
C# Offline Apllication 5 55
How would you add MULTITHREADING to the attached C# code? 4 52
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now