Static binding vs Dynamic binding in C#

CsharpProgrammingServer Side Programming

Polymorphism can be static or dynamic. In static polymorphism, the response to a function is determined at the compile time. In dynamic polymorphism, it is decided at run-time.

Compile Time Polymorphism or Static Binding

The mechanism of linking a function with an object during compile time is called early binding. It is also called static binding or early binding.

Run Time Polymorphism or Dynamic Binding

Runtime polymorphism has method overriding that is also known as dynamic binding or late binding.

Abstract classes contain abstract methods, which are implemented by the derived class. The derived classes have more specialized functionality. Dynamic polymorphism is implemented by abstract classes and virtual functions.

Published on 08-Aug-2018 16:28:06