我將所有選中的項存儲在一個字符串中,這對我來說非常合適,但我想將所有選中的項存儲在數組中並將其與名稱一起存儲。如何將選中的項存儲在vb.net的CheckedListBox中的數組中
Dim i As Integer
Dim ListItems As String
ListItems = "Checked Items:" & ControlChars.CrLf
For i = 0 To (ChkListForPrint.Items.Count - 1)
If ChkListForPrint.GetItemChecked(i) = True Then
ListItems = ListItems & "Item " & (i + 1).ToString & " = " & ChkListForPrint.Items(i)("Name").ToString & ControlChars.CrLf
End If
Next
請幫忙!
感謝您的答覆...工作對我來說.. :) –