VB.NET + searching Multidimensional arrays = question
My scenario is as follows.
I have an array called Students and an array called Courses, both one-dimensional.
I want to create a multi-dimensional array which will contain the student name and courses the student is registered for, so it would appear similar to the following.
Student1 CourseName CourseID
Student1 CourseName CourseID
Student2 CourseName CourseID
Thus my array would be as follows. The name of my array is "LinkTable". I just added a static value of 100 possible students, this the reason the first entry is 99. The 2 is used to create 3 rows. Thus I end up with an array that has, in essence, 100 rows and 3 columns.
My question is this. How can I search through the array and find all instances of "Student 1", in order to pull out the records of the classes he's registered for? I just need a way to search and find that "Student 1 populates elements 1-4", and so on, for all the students.
So who's the resident VB expert?
I have an array called Students and an array called Courses, both one-dimensional.
I want to create a multi-dimensional array which will contain the student name and courses the student is registered for, so it would appear similar to the following.
Student1 CourseName CourseID
Student1 CourseName CourseID
Student2 CourseName CourseID
Thus my array would be as follows. The name of my array is "LinkTable". I just added a static value of 100 possible students, this the reason the first entry is 99. The 2 is used to create 3 rows. Thus I end up with an array that has, in essence, 100 rows and 3 columns.
Dim LinkTable(99, 2) As Integer "Code to populate the elements."
My question is this. How can I search through the array and find all instances of "Student 1", in order to pull out the records of the classes he's registered for? I just need a way to search and find that "Student 1 populates elements 1-4", and so on, for all the students.
So who's the resident VB expert?