使用C#的列表框值的索引 [英] index of Listbox values with c#
本文介绍了使用C#的列表框值的索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只想知道VS2005中Selected列表框项目的索引值.
谁能帮助我.
Hi,
I just want to know index value of Selected listbox item in VS2005.
could anyone help me.
推荐答案
用这个
listbox1.SelectedItems.IndexOf(lv);
问候
Aravind G
Hi,
use this
listbox1.SelectedItems.IndexOf(lv);
Regards
Aravind G
Int32 idx = Lst1.Items.IndexOf(Lst1.SelectedItem);
Int32 idx = Lst1.Items.IndexOf(Lst1.SelectedItem);
myListBox.Items.FindByValue(value)
myListBox.Items.FindByValue(value)
这篇关于使用C#的列表框值的索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文