Click here to Skip to main content
15,881,248 members
Articles / Programming Languages / Visual Basic
Alternative
Tip/Trick

Convert Vertical List to String Array

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
24 Sep 2010CPOL 7.4K   1   1
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)


Written By
President 6D Systems LLC
United States United States
I studied Software Engineering at Milwaukee School of Engineering for 2 years before switching to Management of Information Systems for a more business oriented approach. I've been developing software since the age of 14, and have waded through languages such as QBasic, TrueBasic, C, C++, Java, VB6, VB.NET, C#, etc. I've been developing professionally since 2002 in .NET.

Comments and Discussions

 
GeneralBTW, this doesn't ignore blank lines, but it does solve the ... Pin
Ron Beyer24-Sep-10 6:09
professionalRon Beyer24-Sep-10 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.