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.
Asked
Active
Viewed 1,454 times
1
-
Saving to a string array? A char array? "saving"... to disk? to memory? This question needs more specifics. – Marc L. Nov 01 '12 at 14:44
-
The question is a bit unspecific, since there are a lot of different array-types. – UNeverNo Nov 01 '12 at 14:45
1 Answers
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