1

I am wondering how I would go about saving a string into an array.Its a beginner question , but i really need help. Thanks in advance.

user1683391
  • 79
  • 1
  • 1
  • 12

1 Answers1

0

A string array is created in various ways. In the VB.NET language you can create the array with all its data in an initialization statement. For Example:

Dim arrayName() As String = {"string1", "string2", "string3"}

You can pre-allocate the array and then assign values to its memory locations separately. For example:

Dim newArray(0 to 2) As String
newArray(0) = "string1"
newArray(1) = "string2"
newArray(2) = "string3"
Pinky
  • 665
  • 2
  • 7
  • 17