Read and write to an array from a textbox
I've been experimenting for a very long time and I'm unable to find or make up the code. I believe it is very simple and if someone could help me it would be great.
A text file contains the following values.
etc. until class 5
so my idea first was
dim studentclass(5) As String
studentclass(0) = "Class 1"
studentclass(1) = "Class 2"
Although I'm not sure.
Basically a text file containing such data is in the bin folder.
1. Visual basic program is run, the user is given the capability to click on a button which opens up a "openfiledialog" which then will be used to navigate the file.
2. The program will read in the array.
3. You can search the file e.g. search 0 and it will therefore display:
and then, if you search 1 it would display:
The file must also be saved to the same text file.
If you could please help on reading and writing to an array. The main problem I have is placing that non-array part underneath which in this case are the "Names"