Member Functions
Classes may declare member functions that each instance of the class may call.
Declaring a member function is done with member function declare start
. It takes in the function's privacy (as public
,protected
, orprivate
), name in PascalCase, return type, and any number of (name, type) pairs of parameters.
In C#:
In Python:
Calling
Call member functions with the member function
command. It takes in the same function privacy, , caller's name, and any number of parameters.
In C#:
announcer.Greet("Sample");
In Python:
announcer.greet("sample")
Last updated