M
Monty
Silly question: If I return an object from a property, is it returned ByRef
or ByVal? Is there a way to specify one way or the other? For instance, will
the code that calls the MyObject() property below get a cMyObject as ByRef
or ByVal? Thanks.
Public ReadOnly Property MyObject() As cMyObject
Get
Return moMyObject
End Get
End Property
Bonus question, completely unrelated: In VB.Old I used to put a dollar sign
("$") after a string function to force a string value return rather than a
variant. For instance, "Left(s, 5)" will return a variant, but "Left$(s, 5)"
will always return a string. I notice I still have the option of appending a
dollar sign, but the "Left" function already returns a string type. Does
adding the dollar sign make any difference in VB.Net?
TIA!
or ByVal? Is there a way to specify one way or the other? For instance, will
the code that calls the MyObject() property below get a cMyObject as ByRef
or ByVal? Thanks.
Public ReadOnly Property MyObject() As cMyObject
Get
Return moMyObject
End Get
End Property
Bonus question, completely unrelated: In VB.Old I used to put a dollar sign
("$") after a string function to force a string value return rather than a
variant. For instance, "Left(s, 5)" will return a variant, but "Left$(s, 5)"
will always return a string. I notice I still have the option of appending a
dollar sign, but the "Left" function already returns a string type. Does
adding the dollar sign make any difference in VB.Net?
TIA!