I was just wondering what the difference between using readonly properties
in a class definition instead of using a function?
Example:
Public Class myClass
Private privateValues() as Long
'
' do other stuff to initialize everything here
'
Public ReadOnly Property getPrivateLongV alue_p(ByVal index as integer)
as Long
Get
return privateValues(i ndex)
End Get
End Property
' versus
Public Function getPrivateLong_ f(ByVal index as Integer) as Long
return privateValues(i ndex)
End Function
End Class
This may not be a good example of a reason to use one over the other, but
was interested to know what the differences are?