Rafał Kowalski Rafał Kowalski - 3 months ago 19
Vb.net Question

Multiple values in messagebox

I have that simple code

While reader.Read()
MessageBox.Show(reader(0).ToString().Trim())
End While


Which returns 2 messagebox, one with value 'a' and another with 'b'. How do I modify it to have one messagebox giving me 'a' and 'b' in a single messagebox?

Thanks in advance!

Answer
//declare variable_ and assign to empty string.
While reader.Read()
      variable_ = variable_ + reader(0).ToString().Trim()
End While

MessageBox.Show(variable_)