Programming does not exist in a vacuum. How would you do this with a pen and paper? Each time you add an item you would add a comma first, except if there were no items already in the list. The same goes here:Note that that will get the list in the opposite order to what you currently have. If that's an issue then use a For instead of a For Each loop and work backwards.vb.net Code:
For Each i In ListBox2.Items If items <> String.Empty Then items &= ", " End If items &= i Next i




Reply With Quote