You must use the value returned by this function

  1. 6 weeks ago

    I have this public method named GetHoursWorked and a private property named mHoursWorked.

    GetHoursWorked code:

    Return 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

  2. Christian M

    Jan 12 Pre-Release Testers, Xojo Pro Germany

    Hello,
    assuming the mHoursWorked is of type Double you can do somewhere in your app:

    dim hW as Double
    hW = GetHoursWorked
  3. Markus R

    Jan 12 Pre-Release Testers, Xojo Pro Europe / Germany / Lower Saxon...
    Edited 6 weeks ago

    you had also set the return type in your method?
    you can also use computed properties.

  4. Emile S

    Jan 12 Europe (France, Strasbourg)

    And to be complete, sometimes you do not need the returned value so you can use:

    Call GetHoursWorked

    but not in this case, I think ;)

or Sign Up to reply!