際際滷

際際滷Share a Scribd company logo
INHERITANCE
INHERITANCE
OOP allows class to create new classes which
may have some common feature to the exiting
classes this is achieved by inheritance.
Inheritance is a process of creating new class
from the existing class.
The existing classes are called base class or
super class and the inherited classes are
called derived classes or sub class
Types of inheritance
1. Single inheritance
2. Multiple inheritance
3. multi-level inheritance
Single inheritance

In this case there is only 1 base and derived class and
inheritance take place between them. For ex:Class animal
{
Bones
Legs
hand
}
Class vertebrates
{
Bones
Legs
}
Multiple inheritance
If the child class interact from more than one parent class the it is called multiple inheritance.
Class aquatic animals
{
Breath in water
Gills
}
Class land animals
{
Breath in air
Lungs
}
Class amphibian
{
Breath in water
Breath in air
Lungs
Water
}
Multi-level inheritance
When a sub class is derived from a class which is derived from some other class then it is called multi 
level inheritance.
class transport
{
Fly
Sail
}
Class water transport
{
Sail
No of passenger
}
Class boats
{
sail
No of passenger
}
Ad

Recommended

PPT
Inheritance C#
Raghuveer Guthikonda
PPTX
Inheritance
Sapna Sharma
PPTX
C# basics training (Inheritance)
Ankit Kashyap
PPT
Csharp4 inheritance
Abed Bukhari
PDF
Xamarin: Inheritance and Polymorphism
Eng Teong Cheah
PPTX
interface in c#
Deepti Pillai
PPT
C#.NET
gurchet
PPTX
Interfaces c#
Nipam Medhi
PDF
Lecture on Python OP concepts of Polymorpysim and Inheritance.pdf
waqaskhan428678
PPTX
Inheritance.pptx
Tansh5
PPT
Topic inheritance
Ankit Kumar
PPTX
Inheritance
SangeethaSasi1
PPTX
OOP-part-2 object oriented programming.pptx
palmakyonna
PPTX
Object Oriented Design and Programming Unit-03
Sivakumar M
PPTX
Inheritance
prashant prath
PPTX
Aryan's pres. entation.pptx
mohitsinha7739289047
PPT
Inheritance.ppt
JP2B1197685ARamSaiPM
PDF
INHERITANCE
RohitK71
PPTX
INHERITANCES.pptx
VISHNU PRIYA NR
PPTX
Introduction to inheritance and different types of inheritance
huzaifaakram12
PPTX
Inheritance in Object Oriented Programming
Ashita Agrawal
PPTX
INHERITANCE
VENNILAV6
PPTX
Inheritance
BindhuBhargaviTalasi
PPTX
Inheritance
Burhan Ahmed
PPTX
Inheritance in c++
Vishal Patil
PDF
LEARNING THE RULES OF MUAY THAI - ALEXANDRE BRECK.pdf
ALEXANDRE BRECK
DOCX
British and Irish Lions Fall to Argentina in 2025 Tour Open.docx
eticketing

More Related Content

Similar to Inheritance in C# (20)

PDF
Lecture on Python OP concepts of Polymorpysim and Inheritance.pdf
waqaskhan428678
PPTX
Inheritance.pptx
Tansh5
PPT
Topic inheritance
Ankit Kumar
PPTX
Inheritance
SangeethaSasi1
PPTX
OOP-part-2 object oriented programming.pptx
palmakyonna
PPTX
Object Oriented Design and Programming Unit-03
Sivakumar M
PPTX
Inheritance
prashant prath
PPTX
Aryan's pres. entation.pptx
mohitsinha7739289047
PPT
Inheritance.ppt
JP2B1197685ARamSaiPM
PDF
INHERITANCE
RohitK71
PPTX
INHERITANCES.pptx
VISHNU PRIYA NR
PPTX
Introduction to inheritance and different types of inheritance
huzaifaakram12
PPTX
Inheritance in Object Oriented Programming
Ashita Agrawal
PPTX
INHERITANCE
VENNILAV6
PPTX
Inheritance
BindhuBhargaviTalasi
PPTX
Inheritance
Burhan Ahmed
PPTX
Inheritance in c++
Vishal Patil
Lecture on Python OP concepts of Polymorpysim and Inheritance.pdf
waqaskhan428678
Inheritance.pptx
Tansh5
Topic inheritance
Ankit Kumar
Inheritance
SangeethaSasi1
OOP-part-2 object oriented programming.pptx
palmakyonna
Object Oriented Design and Programming Unit-03
Sivakumar M
Inheritance
prashant prath
Aryan's pres. entation.pptx
mohitsinha7739289047
Inheritance.ppt
JP2B1197685ARamSaiPM
INHERITANCE
RohitK71
INHERITANCES.pptx
VISHNU PRIYA NR
Introduction to inheritance and different types of inheritance
huzaifaakram12
Inheritance in Object Oriented Programming
Ashita Agrawal
INHERITANCE
VENNILAV6
Inheritance
BindhuBhargaviTalasi
Inheritance
Burhan Ahmed
Inheritance in c++
Vishal Patil

Recently uploaded (11)

PDF
LEARNING THE RULES OF MUAY THAI - ALEXANDRE BRECK.pdf
ALEXANDRE BRECK
DOCX
British and Irish Lions Fall to Argentina in 2025 Tour Open.docx
eticketing
PDF
SEMIFINALES 2 LIGA MURO 2025 BASQUET.pdf
Arturo Pacheco Alvarez
PDF
Chad Readey - Passion For Sports And Data Science
Chad Readey
PDF
Cycling and Technology - How Tech is Changing the Way We Ride
Niall O'Riordan UBS
DOCX
Australia beats Japan to move closer to World Cup spot.docx
footballworldcuptick
PDF
David Bennett Galloway III_ Exploring the Three Main Types of Volunteering .pdf
David Bennett Galloway III
PPTX
Sprint Training 際際滷 Deck from Andrew Sheaff
Mark Rauterkus
DOCX
British and Irish Lions Farrells Leadership Born in Crisis.docx
eticketing
DOCX
Assessing the Australia' Back Three Ahead of the Women Rugby World Cup.docx
World Creative Solutions
PDF
Global Esport Market Analysis - 2025-2034
Market.us
LEARNING THE RULES OF MUAY THAI - ALEXANDRE BRECK.pdf
ALEXANDRE BRECK
British and Irish Lions Fall to Argentina in 2025 Tour Open.docx
eticketing
SEMIFINALES 2 LIGA MURO 2025 BASQUET.pdf
Arturo Pacheco Alvarez
Chad Readey - Passion For Sports And Data Science
Chad Readey
Cycling and Technology - How Tech is Changing the Way We Ride
Niall O'Riordan UBS
Australia beats Japan to move closer to World Cup spot.docx
footballworldcuptick
David Bennett Galloway III_ Exploring the Three Main Types of Volunteering .pdf
David Bennett Galloway III
Sprint Training 際際滷 Deck from Andrew Sheaff
Mark Rauterkus
British and Irish Lions Farrells Leadership Born in Crisis.docx
eticketing
Assessing the Australia' Back Three Ahead of the Women Rugby World Cup.docx
World Creative Solutions
Global Esport Market Analysis - 2025-2034
Market.us
Ad

Inheritance in C#

  • 2. INHERITANCE OOP allows class to create new classes which may have some common feature to the exiting classes this is achieved by inheritance. Inheritance is a process of creating new class from the existing class. The existing classes are called base class or super class and the inherited classes are called derived classes or sub class
  • 3. Types of inheritance 1. Single inheritance 2. Multiple inheritance 3. multi-level inheritance
  • 4. Single inheritance In this case there is only 1 base and derived class and inheritance take place between them. For ex:Class animal { Bones Legs hand } Class vertebrates { Bones Legs }
  • 5. Multiple inheritance If the child class interact from more than one parent class the it is called multiple inheritance. Class aquatic animals { Breath in water Gills } Class land animals { Breath in air Lungs } Class amphibian { Breath in water Breath in air Lungs Water }
  • 6. Multi-level inheritance When a sub class is derived from a class which is derived from some other class then it is called multi level inheritance. class transport { Fly Sail } Class water transport { Sail No of passenger } Class boats { sail No of passenger }