Overview of Polymorphism - C#

In this chapter you will learn:
  • What is Polymorphism?
  • Types of Polymorphism in c#

What is Polymorphism?

Polymorphism is one of the fundamental concept and strongest pillars of Object Oriented Programming. Simply Polymorphism means – One Interface, Multiple Functions. It is a Greek word that means Many Forms.

 

Types of Polymorphism

There are two types of Polymorphism in C#.

  1. Static Polymorphism or Compile Time Polymorphism (Early Binding or Method Overloading)
  2. Dynamic Polymorphism or Runtime Polymorphism (Late Binding or Method Overriding)

Static Polymorphism

In static Polymorphism, you bind a function with an object during compile time. In simple word, you tag a function with an object while writing program. It is also called early binding. In static polymorphism, Function Overloading gets implemented.

Dynamic Polymorphism

It is also called as Late Binding or Method Overriding or Dynamic Polymorphism. In dynamic polymorphism, we override base class function using virtual & override keywords.

Summary

In the next chapter, you will learn about Static Polymorphism or Function Overloading with complete programming example.

More Articles

 

Share your thought