LINQ Distinct annonomous ListViewItem "text" query selecting ListViewItem index
Trying to cast a ListView collection distinct to return the items index, I assume i will need to cast the items as string to get the text property but then i will loose the listview collection.
Trying to cast a ListView collection distinct to return the items index, I assume i will need to cast the items as string to get the text property but then i will loose the listview collection.
VB.NET:
[COLOR=#2fcefe]Dim[/COLOR] items = (
[COLOR=#2fcefe]From[/COLOR] item [COLOR=#2fcefe]
In[/COLOR] [COLOR=#2fcefe]Me[/COLOR].NamesListView.Items.Cast([COLOR=#2fcefe]Of[/COLOR] [COLOR=#2b91af]ListViewItem[/COLOR])().Distinct [COLOR=#2fcefe]
Select[/COLOR] item.Index
).ToArray