C Sharp Programming/Keywords/base

The keyword describes that you would like to refer to the base class for the requested information, not in the current instantiated class.

A class is the class in which the currently implemented class inherits from. When creating a class with no defined base class, the compiler automatically uses the base class.

Therefore the two declarations below are equivalent.

Some of the reasons the base keyword is used is:


 * Passing information to the base class's constructor


 * Recalling variables in the base class, where the newly implemented class is overriding its behaviour


 * Recalling methods in the base class. This is useful when you want to add to a method, but still keep the underlying implementation.

/Keywords