Given
var selectedItems = listBoxControl1.SelectedItems;
var selectedItemsList = (from i in selectedItems
select i).ToList();
I receive Error
Could not find an implementation of the query pattern for source type 'DevExpress.XtraEditors.BaseListBoxControl.SelectedItemCollection'. 'Select' not found. Consider explicitly specifying the type of the range variable 'i'.
using system.LINQ
Done
I can use foreach so it must implement IEnumerable
. I prefer to use LINQ over foreach to gather each string, if possible.
I want to take the ToString()
values for each SelectedItem in the list box control and stick them in a List<string>
. How can I do it?