Posts

Showing posts with the label C# Polymorphism

C# Polymorphism

Image
Polymorphism is one of the primary pillars of the object-oriented programming language. - The word polymorphism means having many forms. In OOPs paradigm, polymorphism is often expressed as " One Interface Multiple Functions ". There are two types of polymorphism - 1. Compile Time | Static| Early Binding Polymorphism - is achieved by method overloading and operator overloading. It is also known as static polymorphism. a. Function/Method overloading -  Having two or more methods with same name but different in parameters, is known as method overloading in C#. The  advantage  of method overloading is that it increases the readability of the program because you don't need to use different names for same action. You can perform method overloading in C# by two ways: By changing number of arguments By changing data type of the arguments public   class  Cal{        public   static   int  add( int  a, int  b){...