G
Guest
I have encountered a situation that I don't understand. When I call a sub of
Friend scope (in an object with Friend scope), I am getting an error "Public
member 'subname' not found in type 'myType'". Any idea why? Since Friend
scope should be visible within my assembly, and everying is taking place
within a single project, I don't understand why this error is occuring.
Here is some illustrative code, where I would get the error in the
"MyA.MySub" line in class B:
Friend Class A
Friend Sub MySub()
....do some stuff
End sub
End class
Friend Class B
Friend Sub AnotherSub()
Dim myA as New A
myA.MySub()
End Sub
End Class
--- end code sample
If I change the scope of MySub from Friend to Public, the error goes away,
but it doesn't make sense to me to have a Public sub in a Friend class. I
would like to understand why I am getting the error in the first place.
Thanks in advance!
Tim
Friend scope (in an object with Friend scope), I am getting an error "Public
member 'subname' not found in type 'myType'". Any idea why? Since Friend
scope should be visible within my assembly, and everying is taking place
within a single project, I don't understand why this error is occuring.
Here is some illustrative code, where I would get the error in the
"MyA.MySub" line in class B:
Friend Class A
Friend Sub MySub()
....do some stuff
End sub
End class
Friend Class B
Friend Sub AnotherSub()
Dim myA as New A
myA.MySub()
End Sub
End Class
--- end code sample
If I change the scope of MySub from Friend to Public, the error goes away,
but it doesn't make sense to me to have a Public sub in a Friend class. I
would like to understand why I am getting the error in the first place.
Thanks in advance!
Tim