not a member of 'System.Array'
I can not figure out why I can not access this public function. I made sure that the class is public. I do not know why I am getting this error either. It is not an Array, it is a custom class.
Here is the error:
C:\Reports\Jeff\VB\study\StudyX.NET\frmYourGamesDialog.vb(176): 'findNextQuestionToStudy' is not a member of 'System.Array'.
Code:
Code:
Private Sub frmYourGamesDialog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
frmYourGamesHolder.pauseStudying()
Module1.questionList.findNextQuestionToStudy()
End Sub
A few more INCOMPLETE snippets to let you know how I am declaring stuff:
Module Module1
Public questionList(MAxQUESTIONS) As question
Public Class question
Public Function findNextQuestionToStudy() As Short
Re: not a member of 'System.Array'
Public questionList(MAxQUESTIONS) As question declares the variables as an array of questions. If you want to access one, you would do:
Module1.questionList(0).findNextQuestionToStudy()
Re: not a member of 'System.Array'
Thanks, I should have through of that. Is there a way to make a function that does not require me to specify an individual item in the array? I think I am probably just doing things wrong, but I was curious because I think there is something that allows you to do it in C++.
Basically, I thought it would be easier if I just made an array, without an additional class that would hold the array. And because I only have one class, I wanted to put the control/utility type of functions in with the class, even though they do not fully belong there.
Quote:
Originally Posted by MetalKid
Public questionList(MAxQUESTIONS) As question declares the variables as an array of questions. If you want to access one, you would do:
Module1.questionList(0).findNextQuestionToStudy()