I need to make a course scheduler...and in this, i need to limit the number of courses to 4. also, none of the courses can have conflicting times.
i know the class name and times should be parallel arrays...i may or may not be doing that correctly. I've tried the following:
CODE
Dim times As String
Dim intindex As Integer = strLine.IndexOf("/")
times = strLine.Substring(intindex + 1).Trim
note that the character that comes between the class and its times is "/", so i know that part is ok.
as for the other bits, i've done the following code (all variables are declared as such, although its not listed here):
CODE
Dim i As Integer
i = (lstSchedule.Items.Count()) <= 4
If i > 4 Then
MessageBox.Show("Sorry, no more than 4 classes...Too much work!")
End If
Dim k As Integer
k = 1
For k = 1 To lstSchedule.Items.Count
class1 = times(k)
class2 = lstSchedule.FindStringExact(times(k))
If class1 = class2 Then
lblConflicts.Text = class1 & vbCrLf & class2
End If
Next
i have this in the "add" button code....perhaps that's the wrong place ,but i'm not sure where else to put it. this code doesn't have any visible effect....what am i doing wrong?
thanks so much!!!