OK, i'll help you, but algorithm to display the biggest and smallest values, you must to write by yourself.
Steps to do:
1) Create new windows application project
2) On the form place:
- 1x TextBox
- 3x Buttons (change the names as follow: BtnAdd, BtnClear, BtnDisplayResults)
- 1x ListBox
3) copy and paste the code below:
Public Class Form1
Dim numbers As List(Of Integer) = Nothing
Public Sub New()
InitializeComponent()
numbers = New List(Of Integer)
End Sub
Protected Overrides Sub Finalize()
numbers = Nothing
MyBase.Finalize()
End Sub
Private Sub BtnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAdd.Click
Dim sText As String = String.Empty
sText = Me.TextBox1.Text
numbers.Add(Integer.TryParse(sText, 0))
Me.TextBox1.Text = String.Empty
Me.TextBox1.Focus()
Me.ListBox1.Items.Add(sText)
End Sub
Private Sub BtnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClear.Click
Me.ListBox1.Items.Clear()
numbers.Clear()
End Sub
Private Sub BtnDisplayResults_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDisplayResults.Click
End Sub
End Class
4) Compile project
I use:
ListOf(T)[
^] to store numbers.