65.9K
CodeProject is changing. Read more.
Home

Convert Vertical List to String Array

starIconstarIconstarIconstarIconstarIcon

5.00/5 (2 votes)

Sep 24, 2010

CPOL
viewsIcon

7728

You may want to take a look at String.Join:Your code can be compressed to:Dim str as Stringstr = Chr(34) + String.Join(Chr(34) + "," + Chr(34), arr) + Chr(34)(My VB skills are a bit lacking, so the syntax may be a bit off, but you get the idea).

You may want to take a look at String.Join: Your code can be compressed to:
Dim str as String
str = Chr(34) + String.Join(Chr(34) + "," + Chr(34), arr) + Chr(34)
(My VB skills are a bit lacking, so the syntax may be a bit off, but you get the idea).