How to clear an array of string

I have create an array of string however I can;t seem to find a way to clear the array values? can anyone help?

 tempArray() As String
Who is Participating?
You can use Array.Clear
Dim s As String() = {"A", "B", "C"}
Array.Clear(s, 0, s.Length)

Open in new window

Mike TomlinsonMiddle School Assistant TeacherCommented:
Do you need to clear (reset) the fields?...or actually make the array "empty" (have no elements in it at all).

If the latter, then use List(Of String) instead:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.