How do you get the text from a listbox by index?

后端 未结 3 975
一向
一向 2021-01-22 17:40

I am trying to get text from an entry in my winForms ListBox by index, but I seem to be stumped. The only logical thing I can think of is:

listBox.Items[index].T         


        
3条回答
  •  有刺的猬
    2021-01-22 18:11

    To get the item from a ListBox's items by index please use this way

    string item = listBox1.Items[0];
    

提交回复
热议问题