2016-08-05 25 views

回答

0

Remove方法以實際項目刪除,而不是索引。要按索引刪除,請使用RemoveAt

Dim rnd As New Random 
Dim randomIndex As Integer = rnd.Next(0, ListBox1.Items.Count) 
ListBox1.Items.RemoveAt(randomIndex) 
+0

感謝mark it's working –