Guest User

Untitled

a guest
Jul 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.63 KB | None | 0 0
  1. Public Class Form1
  2.     Private arr As New ArrayList()
  3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.         If TextBox1.Text <> "" Then
  5.             arr.Add(CInt(TextBox1.Text))
  6.             TextBox1.Text = ""
  7.             TextBox1.Focus()
  8.         End If
  9.     End Sub
  10.  
  11.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  12.         Dim i As Integer
  13.         For i = 1 To arr.Count
  14.             ListBox1.Items.Add(arr(i - 1))
  15.             TextBox2.Text = arr(i - 1) & vbCrLf
  16.         Next
  17.     End Sub
  18. End Class
Add Comment
Please, Sign In to add comment