A
Adam J. Schaff
I am forgetting something obvious, I think. I have a form with a combobox on
it. I place the code (below) in the form. Instead of populating the dropdown
with 0 and 1, as I expected, it populates it with two rows, each containing
the string "MyProject.Form1+test"
What am I missing (besides sleep)? Do I need to implement some kind of
interface in test?
Public Class test
Public Sub New(ByVal v As Integer)
Me.Value = v
End Sub
Public Value As Integer
End Class
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim x As New ArrayList
x.Add(New test(0))
x.Add(New test(1))
cbo.DataSource = x
End Sub
-AJ
it. I place the code (below) in the form. Instead of populating the dropdown
with 0 and 1, as I expected, it populates it with two rows, each containing
the string "MyProject.Form1+test"
What am I missing (besides sleep)? Do I need to implement some kind of
interface in test?
Public Class test
Public Sub New(ByVal v As Integer)
Me.Value = v
End Sub
Public Value As Integer
End Class
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim x As New ArrayList
x.Add(New test(0))
x.Add(New test(1))
cbo.DataSource = x
End Sub
-AJ