Deleting element in array

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I wrote the following VB.NET code:

dim str as string()
dim test as string = "C:\test\test\test.doc"

str = test.Split("\")

At this point, str contains 4 members - but how can I delete/remove one of
them? Is it possible to convert a String() array to a 'real' Array?

Thanks
Peter
 
Peter,

A string array is a real array.

You can forever add the items to an Ilist like arraylist doing this.
\\\
Dim arl As New ArrayList
Dim str() As String
arl.AddRange(str)
///
Remember that a string is imutable so you are never working with the same
object when there is a change.

I hope this helps,

Cor
 
Back
Top