Class Reference Problem


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
 
Ad

Advertisements

C

Chris Smith

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
 
Ad

Advertisements

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top