c# - Clear array of strings -


What is the easiest way to clean an array of stars?

have you tried?

  string [] foo = ...; Array Clear (af, 0, af lang);  

Note that this will not will resize the array - it will not do anything

if you actually resize, then the list & lt; String & gt; instead, instead:

/ P>

  list & lt; String & gt; Name = new list & lt; String & gt; {"John", "Holly", "Tom"}; Names.Clear (); // After this, the names will actually be empty (calculation == 0)  

Comments