[Last Call] Learn how to a build a cloud-first strategyRegister Now

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

How convert delimited string to arraylist and visa versa?

Using VB.NET...

How do you convert a comma delimited string to an arraylist?

How do you convert an arraylist to a comma delimited string?
0
RobertNZana
Asked:
RobertNZana
1 Solution
 
vigylantCommented:
Like so:
        'To arraylist
        Dim CSV As String = "a;b;c;d"
        Dim AL As New ArrayList(CSV.Split(";"))
 
        'From arraylist
        Dim NewCSV As String = ""
        For Each S As String In AL
            NewCSV &= S & ";"
        Next
        NewCSV = NewCSV.Substring(0, NewCSV.Length - 1)

Open in new window

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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