Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / VB

Convert Vertical List to String Array

5.00/5 (2 votes)
24 Sep 2010CPOL 7.7K  
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).

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)