c# - Search data in listbox in form 1 on another listbox in form2 -


i have problem code, want search on listbox4 on form2 in listbox 5 on form1.

https://i.stack.imgur.com/8d40u.jpg

i used code shown below:

int index= eski.listbox5.findstring(listbox4.tostring()); if(index= !=-1)     eski[enter image description here][1].listbox5.setselected(index ,true); else     messagebox.show("nothing found") 

programme finds true index value set selected command doesn't work..

how can solve problem?

listbox4.tostring() going return control string. call listbox4.getitemtext(listbox4.selecteditem) instead. also, line 2 should if (index != -1)


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -