Fundamentals of oops with C#

In the programming world, the programming languages are divided into multiple categories (Procedural Programming Languages, Functional Programming Languages, Object-Oriented Programming Languages, Scripting Programming Languages, and Logic Programming Languages). In this article, we are going to discuss object-oriented programming languages. 

 
OOP stands for Object-Oriented Programming. It refers to a programming methodology that supports objects rather than just functions and procedures. In Object-Oriented Programming, the object is a first-class citizen. That means everything is an object in Object-Oriented Programming.
 
As we know, an object is a real-world entity (Books, Pens, Tables, Animals, Humans, etc.) that has its own state, behavior, and identity characteristics that make it different from the others. 

Object




 
In OOP, these objects are organized into classes, which allow individual objects' characteristics to be grouped together. A class is a template that is used to group the characteristics of an object, and an instance of that class is called an object, which has its own characteristics.
 
 
Let's take the example of Pan. Here, the pen is an object category that is used to group the characteristics of the pan objects. So, each Pan has its own state, identity, and behavior, which are grouped into a single unit by using the Pen class. I have two ball pens. One is the Cello Writo-Meter (Blue, Full) and another is the Cello Finegrip (Red, Half). Here, both pens are two different objects with the same types of characteristics. The Cello Writo-Meter and the Cello Finegrip are the identities of the two pens. The blue and red colors represent their behaviors, and full and half represent the state of both pens, respectively.


Let' practically implement this example with the help of C# programming language:









Vikash Chauhan

C# & .NET experienced Software Engineer with a demonstrated history of working in the computer software industry.

Post a Comment

Previous Post Next Post

Contact Form