+92 332 4229 857 99ProjectIdeas@Gmail.com

Searching In ComboBox Through LINQ (Vb.net)




The following code shows you how to search item in ComboBox through language integrated query (LINQ).








Imports System.Linq

   Dim query As IEnumerable(Of Object) = _
            From obj As Object In ComboBox1.Items _
            Where obj.ToString().Equals(TextBox1.Text) _
            Select obj

     For Each ob As Object In query
         ComboBox1.SelectedItem = ob
     Next

0 comments: