Object-Oriented Programming (OOP) Concept in C#.NET

Getting your OOP Concepts clear is the first and the most important step towards becoming a C# Programmer.

As the name suggests, "Object Oriented" means everything is revolving around Objects. To understand what Objects mean, Let's start with a simple Question.

What are the components of a computer program?

A computer program has 2 components.

1. Code

2. Data

Data consist of all the variables in a program which can be modified or used. For Example: variables, constants etc.

Code consists of statements that actually makes use of the Data and manipulate it. For Example, functions, methods, procedures etc.

int i = 10, j = 20, k;    // <- Data 
k = i + j;                // <- Code that operated on i j and k

There are two approaches to programming.

  1. Procedure Oriented Programming: The program's revolves around "What to do and how to do it". It consists of statements that execute one by one and preforms a specific task. The focus is on CODE.
  2. Object Oriented Programming:  The program's revolves around "What is being changed". The main focus is on the DATA. There is some DATA and then there are methods which have controlled access to it. We will discuss about "Objects" later in detail. For now, just understand that everything is considered an Object and has certain operations that can be performed on that object based on the type of object. 

A dog is an Object, a book is an Object, a car, a building , everything is an object! and each object has its own properties and we write methods to change these properties.

For Example: A car would have properties like color, model, current_speed. The methods would be accelerate() and stop().

An Object in #C Example Pictorial Representation

Let's say that the color is "white", model is "Honda City" and when it is parked the current_speed is 0.

When accelerate() method is called it increases the current_speed of the car and the stop() method starts decreasing the speed till the current_speed is back to 0.


We will discuss the PILLARS of Object Oriented Programming in the next page.

(There can be other properties too like seating_capacity, mileage etc. and other methods like change_color(), brake() etc but we have not mentioned them here to avoid complexity)

Banner to

Hide Page Information

Tutorial - Object-Oriented Programming (OOP) Concept in C#

Tutorial - Object-Oriented Programming (OOP) Concept in C#

Here you can find complete tutorial for object-oriented programming (oop) concept through easy learning.

Why OOPS (Object-Oriented Programming)?

In this section you can learn about OOPS (Object-Oriented Programming) fundamentals in C# to improve your .NET skills in order to face the interviews, competitive examinations and various entrance tests with full confidence.

Where can I get tutorials for OOPS (Object-Oriented Programming) in C#?

PlacementYogi provides tutorial on OOP (Object-Oriented Programming) concept through easy learning process focusing interviews.

You can easily learn OOPS (Object-Oriented Programming) concept through our compact and best tutorials.