Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Methods

Data types may have methods that can be called:

object . method ( parameters)

A runtime error is raised if the appropriate method does not exist for the object’s data type.

Elvis Operator

The Elvis operator can be used to short-circuit the method call when the object itself is ().

// method is not called if object is ()
object ?. method ( parameters)