I have an array that is populated by an SQLDataReader. The SQL statement generates a list of numbers, for this example, the numbers are 1 through 6. This can increase or decrease depending on the data. For instance, tomorrow, the values could be 5 through 13.
For QA purposes, I'd like to list the array contents horizontally in a listbox that displays other application QA info in realtime. At the moment, I can list the data vertically by looping in the SQLDataReader. The text appears in the listbox like this:
1
2
3
4
5
6
I'd like the data to look like this.
1 2 3 4 5 6
It should not be in columns as there are other text lines that are sent to the list box. Note, I've placed spaces for readability. The final output would appear like this:
"The check array contents are: 1 2 3 4 5 6"
I know how to do this using the Console but I've not been able to do this with the listbox. Here is my listbox code:
SQLDataReader Preamble....
Int32[] streamArray = (from IDataRecord r in reader1 select (Int32)r["streamID"]).ToArray();
for (int = 0; i < idCount; i++)
{
listbox1.Items.Add(streamArray[i];
}
The purpose for this is QA. The app does quite a bit with different arrays. The readability becomes difficult with large numbers of arrays dumping their contents vertically.
Thank you for the help.