|
-
Aug 6th, 2006, 02:05 AM
#1
Thread Starter
Fanatic Member
listbox additem
i want to add items in a listbox along with its corresponding id.
my code :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim obj As class1
obj = New class1
obj.name = "xyz"
obj.id = 1
ListBox1.Items.Add(obj)
obj = New class1
obj.name = "pqr"
obj.id = 2
ListBox1.Items.Add(obj)
End Sub
Private Class class1
Public name As String
Public id As Integer
End Class
result shown on the form is :
windowsapplication1.form1+class1
windowsapplication1.form1+class1
Any suggestions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|