I have this public method named GetHoursWorked and a private property named mHoursWorked.
I’m trying to get the value of mHoursWorked by calling the GetHoursWorked method but it displays an error you must use the value returned by this function
assuming the mHoursWorked is of type Double you can do somewhere in your app:
dim hW as Double
hW = GetHoursWorked
you had also set the return type in your method?
you can also use computed properties.
And to be complete, sometimes you do not need the returned value so you can use:
but not in this case, I think