I understand it's very basic stuff but maybe it still can help someone.
So in the end it's like that I guess..
Public Class Class1
Private WithEvents InternalBtn As Button
Public Property BtnRef() As Button
Get
Return InternalBtn
End Get...
Ok so, is it correct to say that in VB when I pass an object ByVal I'm passing a "copy" of its reference?
Indeed I originally passed the object ByRef because I was worried about creating another copy of the same object.
And that would also explain why there is no reason to pass ByRef something...
Thanks for the tip, I have used WithEvents and it seems to work.
By the way, I have used this kind of structure:
Public Class Class1
Private WithEvents InternalBtn As Button
Public Sub setBtnRef(ByRef Ref As Button)
InternalBtn = Ref
End Sub
Private Sub...
Hello!
I believe this is a very basic question on VB.net and OOP But I think it will help me to trigger a deeper understanding of what's going on.
I'm essentially new to OOP and VB.net and most probably my question is not so well formulated, sorry for that.
So, I have implemented an easy...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.