Methods

These are the actions that can be performed by (or on) the object.
A method is an action that is associated with the object.
These are often actions that cause something to happen on an object.
Methods can have arguments and a return type.
A method can be thought of as an action for an object.


No Return Type

The simplest method would have no parameters and no return type.



Return Type

Public Function Method_WeeklyPay(ByVal dbHourlyRate as Double) As Double 
   Method_WeeklyPay = (field_dbNormalHours + field_dbOvertimeHours) * dbHourlyRate
End Function


Arguments

Methods may require extra information to be supplied as arguments.
It may or may not have a return value and is more likely to have parameters than a property.


Optional Arguments

Methods can also have optional arguments.



© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext