Professional Documents
Culture Documents
NET
ARRAY
ARRAY CONCEPTS
The variables in an array are called array elements, which are accessed using a
single name and index number representing the position of the element within
the array.
DECLARING AN ARRAY
Dim ColorRed() As String = New String() {“Apple”, “Strawberry”, “Tomato”, “Cherry”}
Dim ColorYellow() As String = New String() {“Banana”, Mangoes”, “Lemon”, “Corn”}
Dim ColorOrange(4) As String
ColorOrange(0) = “Orange”
ColorOrange(1) = “Papaya”
ColorOrange(2) = “Carrot”
ColorOrange(3) = “Pumpkin”
These are declared in the general declarations part of the code. They are
outside any subroutine or functions but still within the class.
These variables have a Public access modifier which means that they can
be used by all elements in the project.
ASSESSMENTS