- Version
- Download 60
- File Size 101.46 KB
- File Count 1
- Create Date April 6, 2016
- Last Updated April 6, 2016
Array Demo in Visual Basic .Net
Array Demo in Visual Basic .Net
An array is a data structure, which can store a fixed-size collection of elements of the same data type.
In this program we have declared programming as our variable that can handle multiple values. Arrays are zero-based: the first element is indexed with the number 0.
Source code:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim programming(4) As String
programming(0) = "Visual Basic 6"
programming(1) = "Visual Basic .Net"
programming(2) = "Java"
programming(3) = "PHP"
programming(4) = "C#"
For x = 0 To programming.Length - 1
ListBox1.Items.Add(programming(x))
Next
End Sub
End Class