Pages: << 1 ... 14 15 16 17 18 19 ...20 ...21 22 23 24 25 >>
The Zee language allows classes to be extended. This feature allows the user to add methods and properties to a built-in or user-defined class. To extend a class, use the keyword ‘extend’ as in the following example:
extend class Math
static Number MyNewMethod (Number nValue)
{body of method}
MyNewMethod is now available along with all of the other built-in methods of the Math class. Here are some notes to enhance your understanding of ‘extend’:
Extension methods and properties are called like their regular counterparts.