You can use any routine almost as if it were a property. It is not a particularity of B4X, with VB Net and I think all other languages you can do this, but methods and properties are not exactly the same (otherwise properties would never have existed, in any programming language).
Public Sub getSelectedValue As Object
Return GetValueImpl (mSelectedIndex)
End Sub
Public Sub setSelectedValue (v As Object)
If StringMode Then
SetIndex(mStringItems.IndexOf(v), False)
Else
Dim n As Double = v
SetIndex(Min(Size - 1, Max(0, Round((n - mStartRange) / mInterval))), False)
End If
End Sub
I hope that since "even" Erel creates properties (and not just the stupid who is writing) will convince you that they are useful
Ok, he doesn't just use a variable in this property. However, what was written in the previous post is valid.