Inheritance
Parent class fields and methods are inherited into child classes.
Allows us to reuse existing code.
--------------------------------------------------------
Interview Questions and Answers
1. Types of inheritance
Single inheritance (1 parent class + 1 child class)
Hierarchical inheritance (more than one child class + 1 parent class)
Multilevel inheritance (child2 inherits child1, child1 inherits parent1)
Multiple inheritance (1 child class + more than one parent class)
2. Does C# support multiple inheritance?
No, but we can achieve it by using interface.
3. how to prevent class from being inherited?
using sealed keyword
------------------------------------------------------------------------
C Sharp playlist: • C# | .Net core | .Net ...
Subcribe: / @micah_tech
Instagram: / micah_tech
GitHub: github.com/Kir...
whatsapp: wa.me/91936058...
-------------------------------------------------------------------------
tag
.Net framework, ASP.Net, ADO.Net, Linq, Parallel Linq, Visual Studio, VB.Net, Web API, Web services, WCF, WinForms, MVC framework, .Net core, ASP.Net core, MVC .Net core, Visual Studio Code, Visual basics, C# Programming language, CLR, compiled code, Tutorial, interview question and answer, C# demo, freshers and experienced job search, coding in .Net, Entity framework, oops concepts, object-oriented programming language
#மைக்காடெக் #micah #kirubason #கிருபாசன் #MicahTech
Негізгі бет Inheritance | Types | C# | .Net | Tutorial - 4 | Tamil
Пікірлер: 6