Object Oriented Programing
[OOP]
Session
Content
1. Operator Overloading
2. Casting Operator Overloading
3. Abstraction
4. Static
5. Sealed
6. Partial
OOP Definition
OOP Consists Of 4 Pillars :
1. Encapsulation
2. Inheritance
3. Polymorphism
4. Abstraction
1. Constructor Overloading
2. Indexer Overloading
3. Method Overloading
4. Operator Overloading
5. Casting Operator Overloading
Overload
ing
Operator
Overloading
1. Binary Operator + , - , / , * , %
2. Unary Operator ++ , - -
3. Relational Operators > , < , >= , <= , ==
Operator
Overloading
Casting Operator
Overloading
OOP Definition
OOP Consists Of 4 Pillars :
1. Encapsulation
2. Inheritance
3. Polymorphism
4. Abstraction
Abstraction
used to hide unnecessary information and display only necessary
information to the users interacting
Abstract Class
● Is a Partial Implementation for Other Classes [Concrete Class]
● You Can’t Create Object [Instance] from Abstract class , Because it is
not Fully implemented
C# Keywords Indicate The Accessibility Scope
What You Can Write Inside The Abstract Class :
1. Attribute
2. Property
3. Function
4. Event
5. Abstract Method
6. Abstract Property
Abstract
Class
Interface
● Code Contract Between 2
Developers
Abstract
Class
● Partial implementation for Other
Classes.
Static
[Class , Method , Constructor , Property , Attributes]
C# Keywords Indicate The Accessibility Scope
● is a just Container For Static Members [Attribute, Property,
Constructor, Method] and Constants
● You Can't Create Object From This Class (Helper Class)
● No Inheritance for this Class
Static
class
C# Keywords Indicate The Accessibility Scope
● Class Member Method Called Through Class
● The Result Of Calling Method Won't Differ By The Difference Of
The Object State [Data]
Static
Method
Static Property [Class Member Property] Must Return One Of These:
1. Static Attribute
2. Constant
Static
Property
Compiler Will Initialize the Static Attribute With The Default Value of
Its Datatype
Static
Attribute
Usages Of Class
1. Call Static Method or Static Property
2. Create Object From This Class
3. Create Object From Another Class Inheriting From This Class
● Static Constructor [Maximum Only One Static Constructor Per Class].
● Can't Specify Access Modifiers or Parameters for Static Constructor .
● Will be Executed Just Only One Time Per Class Lifetime Before the first
Usage of Class .
Static
Constructor
Sealed
[Class , Method , Property ]
Partial
[Class , Struct , Interface , Method ]
Employees
Entity Framework Core
[ORM]
Mapping
Employees
Entity Framework Core
[ORM]
Mapping

Object-oriented programming using C# programming language 05