Object Oriented Programming in C#

Object Oriented is an approach in programming that has been introduced in 70's which come into existence to resolve the drawbacks of procedural programming languages like security & reusability. A language to be called as Object Oriented needs to satisfy a set of principles prescribed under the standards of the approach. Those principles are

·         Encapsulation

·         Abstraction

·         Inheritance

·         Polymorphism

Encapsulation: It is all about wrapping of the data of a program under a container known as class which provides the security for the contents that are defined inside it.

                    

Abstraction: It is all about hiding the complexity behind a program and providing with a set of interfaces to consume the functionalities.

Inheritance:  According to the inheritance properties of parent belongs to their children's for consumption. So children's can consume what they have inherited from their parent.

 

                                                                 


Polymorphism: Behaving in different ways depending upon the input received is known as Polymorphism i.e., whenever the input changes automatically the behaviour/output also changes.