0

Hello everyone!

I'm working on a school project where I need to make a GPA calculator. I have a user control for classes and another for the type of program you are in. I'm having trouble getting an array of user controls to work mostly probably because I don't think I have the correct syntax for it. I tried doing this for the array but don't think it's right.

Dim Courses() As Course = {Courses1, Courses2, Courses3, Courses4, Courses5, Courses6}

Where Course is my user control, and courses1-6 are on my second user control CourseTab.

When I tried to run and debug my code, it tells me that the array is empty.

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by Begginnerdev
1

Try this:

Dim lstCourses As New List(Of Course)

This will create a list, you can add and remove elements like this:

lstCourses.Add(Courses1)
lstCourses.Remove(Courses1)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.