Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
295
Using LINQ to see if Item already exists in list
posted

 Im trying to use c# and linq to simplfy searching through the listview but cannot get it to work can anyone help?

 

here iswhat i got so far which doesnt work.

 

var qry = from L in listviewname.items.all

             where l.item.value == "123"

           Select L.item.value;

 

Thanks Gary 

  • 69832
    Verified Answer
    Offline posted

    Try this:

                var query = from UltraListViewItem l in lv.Items
                            where l.Value.Equals( "123" )
                            select l.Value;