Making Methods Virtual

From RAD Studio
Jump to: navigation, search

Go Up to Creating methods Index

You make methods virtual when you want different types to be able to execute different code in response to the same method call.

If you create components intended to be used directly by application developers, you can probably make all your methods nonvirtual. On the other hand, if you create abstract components from which other components will be derived, consider making the added methods virtual. This way, derived components can override the inherited virtual methods.

See Also