how to select a ListViewItem from ListViewItemCollections using Linq in C#?
i tried on using this but it didn’t work..
ListViewItemCollections lv = listview1.items;
var test = from xxx in lv where xxx.text = "data 1" select xxx;
test <--- now has the listviewitem with "data 1" as string value..
To get an enumerator of
ListViewItem, you have to cast theItemscollection of ListView:Then, you can use LINQ with it: