Class Reference Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a class within a class and need to use a method in the main class like:

Public Class myMainClass
Public Sub mySubToDoSomething ()
.....
End Sub

Friend Class mySubClass
myMainClass.mySubToDoSomething() 'Get Error Here
End Class

End Class
 
Something like this maybe?

Public Class Test

Public Sub Testsub()

End Sub

Friend Class subTest

Public Sub New()

Dim T As New Test

T.Testsub()

End Sub

End Class

End Class
 
Thanks Chris. I found my problem. What I had done was add the project to my
solution (which was a user control) and also added a reference to the
project's DLL file which created confusion on the part of the compiler. It
wasn't sure whether to use the enums and classes in the added project or the
referenced DLL.
 
Back
Top