SlideShare a Scribd company logo
Coding Horror
The scary show for Programmers
Based on True stories from the desk of
software programmers
Inheritance
Episode #1
About the dumbledores
Syed Mansoor Ahmed
(Project Manager)
- Proud Wiproite from last
10 Yrs
- Leads AppC Automation
team
syedmansoor.ahamed@wipro.co
m
Ankit Kashyap
(Analyst Programmer)
- Proud Wiproite from last
5.9 Yrs
- Works as developer;
take care of AppC tools
ankit.kashyap@wipro.com
Why We need it?
Open Close Principle
“software entities (classes, modules, functions,
etc.) should be open for extension, but closed for
modification”
-from Wikipedia
We all know Inheritance! Yay!!
Let’s check it!!!
Time for hands-on…
Car is a
vehicle! So
sweet!!
Back to geometry classes!!
Rectangle Square
Square is a
Rectangle
Awww! Cute ducks need software…
And here darkness ends!!
*Shameless copy from some site
Under the tree! Like Budhha
• Are constructors and destructors inherited ?
• How do you prevent a class from being inherited ?
• Can you mark method as sealed ?
• what do you mean by upcasting and downcasting ?
References…
• http://en.wikipedia.org/wiki/Inheritance_%28object-oriented_programming%29
• http://stackoverflow.com/questions/4428725/can-you-explain-liskov-
substitution-principle-with-a-good-c-sharp-example
• http://en.wikipedia.org/wiki/Liskov_substitution_principle

More Related Content

Similar to C# basics training (Inheritance)

C# basics training (Interfaces)
C# basics training (Interfaces)C# basics training (Interfaces)
C# basics training (Interfaces)
Ankit Kashyap
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and Appium
Emergya
 
25 10-2010 presentation ois evening4
25 10-2010 presentation ois evening425 10-2010 presentation ois evening4
25 10-2010 presentation ois evening4
Neels Westhuizen
 
Reimagining User Experiences/User Interfaces
Reimagining User Experiences/User InterfacesReimagining User Experiences/User Interfaces
Reimagining User Experiences/User Interfaces
Ebtihaj khan
 
Using legacy code with micro frontends
Using legacy code with micro frontendsUsing legacy code with micro frontends
Using legacy code with micro frontends
Ran Wahle
 
Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Xamarin - Why I started learning it?
Xamarin - Why I started learning it?
Ankit Kashyap
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
Ivo Andreev
 
Micromouse
MicromouseMicromouse
Micromouse
butest
 
Pharo, Spec and GTK
Pharo, Spec and GTKPharo, Spec and GTK
Pharo, Spec and GTK
ESUG
 
About RumiCar project
About RumiCar projectAbout RumiCar project
About RumiCar project
Rumika Chiba
 
"Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina "Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina
Fwdays
 
Robotic hand
Robotic handRobotic hand
Robotic hand
Samet Çıklaçandır
 
Unikernels: when you should and when you shouldn't
Unikernels: when you should and when you shouldn'tUnikernels: when you should and when you shouldn't
Unikernels: when you should and when you shouldn't
Amir Chaudhry
 
RESUME
RESUMERESUME
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
Sebastien Kuntz
 
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
LogeekNightUkraine
 
final project-1.pptx
final project-1.pptxfinal project-1.pptx
final project-1.pptx
AjaySinghPatel7
 
Simulation in Robotics
Simulation in RoboticsSimulation in Robotics
Simulation in Robotics
Pablo Iñigo Blasco
 
Kamaelia Europython Tutorial
Kamaelia Europython TutorialKamaelia Europython Tutorial
Kamaelia Europython Tutorial
kamaelian
 
Hexagonal Architecture.pdf
Hexagonal Architecture.pdfHexagonal Architecture.pdf
Hexagonal Architecture.pdf
VladimirRadzivil
 

Similar to C# basics training (Inheritance) (20)

C# basics training (Interfaces)
C# basics training (Interfaces)C# basics training (Interfaces)
C# basics training (Interfaces)
 
Continuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and AppiumContinuous Integration of Mobile Apps with Docker and Appium
Continuous Integration of Mobile Apps with Docker and Appium
 
25 10-2010 presentation ois evening4
25 10-2010 presentation ois evening425 10-2010 presentation ois evening4
25 10-2010 presentation ois evening4
 
Reimagining User Experiences/User Interfaces
Reimagining User Experiences/User InterfacesReimagining User Experiences/User Interfaces
Reimagining User Experiences/User Interfaces
 
Using legacy code with micro frontends
Using legacy code with micro frontendsUsing legacy code with micro frontends
Using legacy code with micro frontends
 
Xamarin - Why I started learning it?
Xamarin - Why I started learning it?Xamarin - Why I started learning it?
Xamarin - Why I started learning it?
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
 
Micromouse
MicromouseMicromouse
Micromouse
 
Pharo, Spec and GTK
Pharo, Spec and GTKPharo, Spec and GTK
Pharo, Spec and GTK
 
About RumiCar project
About RumiCar projectAbout RumiCar project
About RumiCar project
 
"Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina "Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina
 
Robotic hand
Robotic handRobotic hand
Robotic hand
 
Unikernels: when you should and when you shouldn't
Unikernels: when you should and when you shouldn'tUnikernels: when you should and when you shouldn't
Unikernels: when you should and when you shouldn't
 
RESUME
RESUMERESUME
RESUME
 
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
 
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
Dmitrii Dolzhenko: “С++ 2017 and Beyond, Deliberate Choice of Programming Lan...
 
final project-1.pptx
final project-1.pptxfinal project-1.pptx
final project-1.pptx
 
Simulation in Robotics
Simulation in RoboticsSimulation in Robotics
Simulation in Robotics
 
Kamaelia Europython Tutorial
Kamaelia Europython TutorialKamaelia Europython Tutorial
Kamaelia Europython Tutorial
 
Hexagonal Architecture.pdf
Hexagonal Architecture.pdfHexagonal Architecture.pdf
Hexagonal Architecture.pdf
 

More from Ankit Kashyap

Fast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCFast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVC
Ankit Kashyap
 
Azure SQL, Blobs and ATS
Azure SQL, Blobs and ATSAzure SQL, Blobs and ATS
Azure SQL, Blobs and ATS
Ankit Kashyap
 
Azure fundamentals Part 1
Azure fundamentals Part 1 Azure fundamentals Part 1
Azure fundamentals Part 1
Ankit Kashyap
 
Wipro hackathon tekpill
Wipro hackathon tekpillWipro hackathon tekpill
Wipro hackathon tekpill
Ankit Kashyap
 
Code workshop
Code workshopCode workshop
Code workshop
Ankit Kashyap
 
C# basics training (tips and tricks)
C# basics training (tips and tricks)C# basics training (tips and tricks)
C# basics training (tips and tricks)
Ankit Kashyap
 
Fast Track - Windows 8 Apps
Fast Track - Windows 8 AppsFast Track - Windows 8 Apps
Fast Track - Windows 8 Apps
Ankit Kashyap
 

More from Ankit Kashyap (7)

Fast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCFast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVC
 
Azure SQL, Blobs and ATS
Azure SQL, Blobs and ATSAzure SQL, Blobs and ATS
Azure SQL, Blobs and ATS
 
Azure fundamentals Part 1
Azure fundamentals Part 1 Azure fundamentals Part 1
Azure fundamentals Part 1
 
Wipro hackathon tekpill
Wipro hackathon tekpillWipro hackathon tekpill
Wipro hackathon tekpill
 
Code workshop
Code workshopCode workshop
Code workshop
 
C# basics training (tips and tricks)
C# basics training (tips and tricks)C# basics training (tips and tricks)
C# basics training (tips and tricks)
 
Fast Track - Windows 8 Apps
Fast Track - Windows 8 AppsFast Track - Windows 8 Apps
Fast Track - Windows 8 Apps
 

Recently uploaded

Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 

Recently uploaded (20)

Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 

C# basics training (Inheritance)