I am trying to receive values from a listbox and make a string which separates the items by ","
The following code does the job, but instead of the items, i get "System.Data.DataRowView" over and over.
Here is my code:
string[] items = listBox1.Items.OfType<object>().Select(item => item.ToString()).ToArray();
string result = string.Join(",", items);
label1.Text = result;
The following code does the job, but instead of the items, i get "System.Data.DataRowView" over and over.
Here is my code:
string[] items = listBox1.Items.OfType<object>().Select(item => item.ToString()).ToArray();
string result = string.Join(",", items);
label1.Text = result;