December 2001
Beginner
976 pages
22h 4m
English
Class methods can be used as you would use any function or subroutine, except that you need a valid object on which to invoke the method. Use the dot-notation to invoke the method and place the parameters (if any) in parentheses after the method name. If the method is a function, you can assign the result value to a variable of the appropriate type or use the function in an expression.
You have probably noticed that the properties and methods are relatively similar from the implementation point of view. For example you could easily rewrite the Horse class presented previously to replace all properties with functions and subroutines, as shown in the example:
Public Class Horse Private m_name As String Private m_color As String Private ...
Read now
Unlock full access