FlyingPenguin
n00b
- Joined
- Jan 7, 2003
- Messages
- 39
i am working on this transcript program for students.
i have a class called cSemester
on my form I need a bunch of semesters so i want to declare an array. The problem I am running into is that I can't delcare it properly.
dim sem(8) as cSemester
that will let me declare it. however, whenever i try to use any of the class's methods i get this error "Object reference not set to an instance of an object". So i then assumed its because i didn't create a new instance of the class by using the new keyword so i tried this
dim sem(8) as new cSemester
when i try to compile with that line it says "Arrays can not be declared with 'New'."
so my qestion is how do i declare an array of type cSemester?
i have a class called cSemester
on my form I need a bunch of semesters so i want to declare an array. The problem I am running into is that I can't delcare it properly.
dim sem(8) as cSemester
that will let me declare it. however, whenever i try to use any of the class's methods i get this error "Object reference not set to an instance of an object". So i then assumed its because i didn't create a new instance of the class by using the new keyword so i tried this
dim sem(8) as new cSemester
when i try to compile with that line it says "Arrays can not be declared with 'New'."
so my qestion is how do i declare an array of type cSemester?