ComboBoxItem text ve value değerlerini alan class ımız. Kodunu aşağıda bulabilirsiniz.
'--------------------------------------------------------------
Dim lstMonths As New List(Of ComboBoxItem)
lstMonths.Add(New ComboBoxItem("January", 1))
lstMonths.Add(New ComboBoxItem("February", 2))
lstMonths.Add(New ComboBoxItem("March", 3))
lstMonths.Add(New ComboBoxItem("April", 4))
lstMonths.Add(New ComboBoxItem("May", 5))
lstMonths.Add(New ComboBoxItem("June", 6))
lstMonths.Add(New ComboBoxItem("July", 7))
lstMonths.Add(New ComboBoxItem("August", 8))
lstMonths.Add(New ComboBoxItem("September", 9))
lstMonths.Add(New ComboBoxItem("October", 10))
lstMonths.Add(New ComboBoxItem("November", 11))
lstMonths.Add(New ComboBoxItem("December", 12))
'cbMonths is a combobox
cbMonths.DataSource = lstMonths
cbMonths.DisplayMember = "Text"
cbMonths.ValueMember = "Value"
'--------------------------------------------------------------