Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

about current list

$
0
0

Hi,

is there a way I can put the current list items in this line of code?

items.AddRange(new string[] { "Cat", "Dog", "Carrots", "Brocolli" });

            foreach (string str in items)
           {
                listBox1.Items.Add(str);
            }

I mean this cat,dog and etc will be change to current list items

so that whenever I type something in the textbox,it will show an item nearest to the text that i input in the textbox to my listbox,because in my listbox it shows the current list


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>