Abstract Class vs Interface (Real Application Use) in C# .NET

preview_player
Показать описание
Q. What is the difference between an Abstract class and an Interface (atleast 4)?
Q. When to use Interface and when Abstract class in real applications?

1. Full .NET Interview Course (with PDF Book)

C# / ASP.NET Core / MVC / API - Top 500 Interview Questions

Don't worry if course not helping you, Udemy has 30 days Free Refund Policy.

2. Quick Revision Book (PDF format)

Top 500 .NET Interview Questions - OOPS/ C#/ ASP.Net/ MVC/ SQL /.Net Core /Web API

50% Discount Applied on above link.

My best wishes are with you.
Комментарии
Автор

This is the one abstract class video that actually makes sense to me thank you

marquismccann
Автор

months of confusion minutes of solution... thanku
its very lucid

zeenatfirdoshquadri
Автор

Many years and 100's of videos trying to undertsand this. Thank you.

voice-over
Автор

Abstract class :
It is declared as abstract keyword.
It has both abstract and not abstract method.
It has both declaration and definition.
Default scope of member is private.
Multiple inherence is not supported.
It can have constructor

Interface:
It is declared as interface keyword.
It has only abstract method.
It has only declaration.
Default scope of member is public
It supports Multiple inherence.
It does not have constructor.

divyapriya
Автор

I have no word for your knowledge, awesome happy rawat ji

naveenbaghel
Автор

"Thank you for the video and all your hard work! I noticed at 6:01 you said, 'Normally we prefer Interfaces because it gives us the flexibility to modify the behavior at a later stage.' I think you might have meant to say abstract classes. Although interfaces can be changed later, there's a problem because every time you add a new method to the interface, all the classes that use this interface have to be updated to include this new method. That can cause a lot of extra work.

DrEgypt-hesw
Автор

Super anna... excellent keep going do all videos anna we will support you

mounikanimma
Автор

Abstract class can contain class fields but interface cannot contain class fields

aritrachakraborty
Автор

thank you for excellent content - exactly what people needed here

paulh
Автор

It means abstract class acts as an Interface for the derived class when we go for inheritance and if we create an object of the derived class we must override the function of base class because the base class is abstract

Anuj_sk
Автор

Excellent 👌

After watching lots of difference, now I get clear idea 💡 about it...

Thank you 👍

akshaydaundkar
Автор

very nice explanation, Thanks to you !!

kyyhtpv
Автор

Use of inheritance is reuse code but when we use interface for multiple inheritance we need to write method body in each derived class. Pls clarify my doubt

kumaravelg
Автор

Sir please video in hindi on why we need to create abstract class TCS interview question.

nityanandbhangale
Автор

Great video! Thank you for the splendid explanation!

superkfc
Автор

Hello and Thank you for this tutorial.
I think methods in interface can not have accessors, like public, etc.

iliashterev
Автор

Exactly what for I was looking 👍 thanks

shahrukhchaus
Автор

But in your example you use public access modifier in interfaces. I think we cannot use public access modifiers in interfaces.

atulkrjha
Автор

Sir First point clear nhi huva.. Ki new feature m hum method body interface and abstract class m use kar sakte h.. Phir ye man ley ki new feature k ane pr first difference jo aap ne btya h vo exclude hai?

PraveenKumar-umtx
Автор

4 year full stack .net developer ko kitna package hona chahiye

shubhamshinde