Kevin Davis

Kevin Davis

  • NA
  • 52
  • 51k

Getting items from combobox into an array, then to a string

Sep 1 2011 2:23 PM
Can someone please tell me what I'm doing wrong here?

I'm trying to place all the items from a combobox into an array, but it doesn't seem to be working for me.
My code:

Dim name as string
Dim list As New ArrayList
For i = 0 To form.cbSMTPAccounts.Items.Count - 1
name = form.cbSMTPAccounts.Items(i).text.ToString
list.Add(name)

I keep getting "Public member 'text' on type 'String' "  error,

Incidentally, Once this array is working properly, I would like to convert it to a single string if possible...if that makes any sense

kevin

Answers (5)