Advertisement
Yuven

Untitled

May 26th, 2017
578
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.92 KB | None | 0 0
  1. Public Class Form1
  2.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  3.         Dim uno As New Person("Numero", "Uno","Wayville","12/12/1012", "Numerouno@gmail.com", 12345678)
  4.         Dim dos As New Person("Numero","dos","Heyville","01/01/2011", "Numerodos@gmail.com", 12876543)
  5.         Dim tres As New Student("Numero", "tres", "Dudeville", "05/05/2005", "Numerotres@gmail.com", 12346578, 2015, "Juss")
  6.         Dim quatro As New Ansatt("Numero", "quatro", "sickville", "09/09/2009", "numeroquatro@gmail.com", 99999999, "Rektor", 45)
  7.  
  8.     'MsgBox(tres.ToString)
  9.     Try
  10.         Dim liste As New ArrayList()
  11.         liste.Add(uno.ToString)
  12.         liste.Add(dos.ToString)
  13.         liste.Add(tres.ToString)
  14.         liste.Add(quatro.ToString)
  15.  
  16.         ListBox1.Items.Clear()
  17.         Dim indeks As Integer
  18.         For indeks = 0 To liste.Count - 1
  19.             ListBox1.Items.Add(liste(indeks))
  20.         Next
  21.    
  22.         Catch ex As Exception
  23.             MsgBox(ex.Message)
  24.         End Try
  25.     Ens Sub
  26. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement