Part 33 - C# Tutorial - Difference between abstract classes and interfaces.avi

Part 33 - C# Tutorial - Difference between abstract classes and interfaces.avi

kudvenkat

12 лет назад

536,026 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@worldlovers7318
@worldlovers7318 - 21.11.2023 08:50

Best teacher, what I am today is due to your helpful materials. There was a time when I got my degree I tried a lot to get easy materials to help me in getting a job but remained jobless for a long time. But I continued struggling for getting a job, one day I got these tutorials and soon after 2 weeks I got a job. Thanks a lot sir venkat, you are really a professional teacher.

Ответить
@sparfRF
@sparfRF - 30.01.2023 21:18

Interface class only contains non-implemented methods while an abstract class can have field members, implemented methods, and non-implemented methods. Interface class is a contract where the inheriter agrees to implement the methods and an abstract class is an incomplete class that can't be created and only inherited from.

Ответить
@hmmer3471
@hmmer3471 - 09.01.2023 08:50

Now after c# 8, even interface can have method implimentation.

Ответить
@BinojDaniel
@BinojDaniel - 26.02.2022 05:00

But sir.. Interface can have access modifiers and can have implementation as well.
Below code worked.

interface Itest1
{
public void iprintf1()//explicit access modifier
{
Console.WriteLine("Hello World in interface 1");
}
}
class clsNew : Itest1
{
}
class Program
{
static void Main(string[] args)
{
Itest1 oItest1 = new clsNew();
oItest1.iprintf1();
}
}

Ответить
@soubarnobanerjee8257
@soubarnobanerjee8257 - 29.01.2022 10:43

Hi Venkat! I know it's been long since you've made this video, but I'm commenting this now: Please rectify if I'm wrong. I think in current version of dotnet(6), we can also create complete method definition inside an interface, which eliminates this key difference between an abstract class and interface.

Even we can add "public" before a method definition in an interface and the compiler won't throw an error at compile-time

Ответить
@shaunhunterit342
@shaunhunterit342 - 07.12.2021 23:38

Good video thanks, just so quiet....

Ответить
@kumarshrey209
@kumarshrey209 - 13.04.2021 22:10

14 april 2021

Ответить
@jnr2257
@jnr2257 - 26.02.2021 08:58

He should arrange a meetup. we want to meet him. Hes is so crisp and clear , he even corrects his grammar.

Ответить
@d4services413
@d4services413 - 19.12.2020 16:59

Hi, 
If anyone needs guidance to crack interviews of Dot Net to get massive hike, please contact on 7448009456.
This is for serious candidates with having experience atleast 2 years
Regards

Ответить
@aniketjadhav9638
@aniketjadhav9638 - 15.10.2020 12:25

But now in C# 8.0 we have interface having implementation for its members. And many more additional features.

Ответить
@ankurbansal904
@ankurbansal904 - 10.10.2020 19:36

you are a LEGEND.

Ответить
@user-gi7tr5ju6e
@user-gi7tr5ju6e - 06.08.2020 04:47

please english subtitles....

Ответить
@subhrajyotisen7153
@subhrajyotisen7153 - 04.08.2020 17:12

Interfaces can have properties though. You should mention that

Ответить
@shivaniberi3205
@shivaniberi3205 - 14.06.2020 15:37

Good job in explaining the concept

Ответить
@AtaSabri
@AtaSabri - 28.04.2020 18:50

sorry , but on c # v 8 Interfaces Can Have Implementation

Ответить
@magnusm4
@magnusm4 - 18.04.2020 01:38

So an Interface can only have a method's declaration and name but no function or data.
And an abstract class cannot be inherited or gotten multiple times by the same class, but an abstract class CAN inherit from another abstract class.
Thus to combine multiple abstract classes you simply make them inherit each other, thus the final class gets the functionality of all the abstract classes.

Ответить
@firstlove7626
@firstlove7626 - 17.01.2020 01:08

When to use Abstract Class and When to use Interface ?

Ответить
@Janasep19
@Janasep19 - 02.12.2019 20:20

Can anyone tell me why Interfaces and where we using it in real time?

Ответить
@vaanibommakanti6458
@vaanibommakanti6458 - 12.07.2019 22:24

Can u explain the third point in detail ...

Ответить
@DnyaneshwarLondhedslondhe121
@DnyaneshwarLondhedslondhe121 - 10.05.2019 05:42

Hi Venkat,
I have been asked so many times a question in Interview that-
In which case we should go for abstract classes and Interfaces?
Please help me.

Ответить
@suganyaravichandran2618
@suganyaravichandran2618 - 24.04.2019 09:38

Really helpful.Great work

Ответить
@surajkant9653
@surajkant9653 - 28.03.2019 09:39

Sir plz explain encapsulation vs abstraction with example, Having seen so many videos I got confused.

Ответить
@popescugeorge6156
@popescugeorge6156 - 04.02.2019 16:40

And the constructor :D

Ответить
@MuhammadUsman-rp3ph
@MuhammadUsman-rp3ph - 23.11.2018 20:32

thank u

Ответить
@RafayKhanfy
@RafayKhanfy - 20.11.2018 14:33

Hello Sir Thank you for explaining so good.
You didn't tell about usage of abstract or interfaces in real time project.
why wo we use it.

Ответить
@abhisheklakhera2107
@abhisheklakhera2107 - 10.10.2018 10:01

Thanks buddy, your all video very useful for all developer.

Ответить
@mallikarjunyenagandhula4713
@mallikarjunyenagandhula4713 - 05.07.2018 20:57

Interface only inherited by interface? Then where will be the implementation of interface members?

Ответить
@codewizard5327
@codewizard5327 - 23.05.2018 08:45

I believe, unlike in C#, in Java, an interface can have field. Right?

Ответить
@EspatiallyGood
@EspatiallyGood - 18.05.2018 15:50

This is such a great teacher and brilliant series. I have learnt so much from your videos! Thank you so much.

Ответить
@ahmedabdulrazzaq2015
@ahmedabdulrazzaq2015 - 20.02.2018 06:22

Thank you that helps me alot to understand what is the difference between Abstract and interface.

Ответить
@puneethvandrapu5593
@puneethvandrapu5593 - 19.02.2018 22:40

How can an abstract class inherit from another class or interface when it is always a base class

Ответить
@tomyang7788
@tomyang7788 - 08.02.2018 03:08

why would u have a method that is not abstract in an abstract class ?

Ответить
@sabyalkubayse4644
@sabyalkubayse4644 - 04.01.2018 21:25

you are the best

Ответить
@EAVicto
@EAVicto - 07.10.2017 20:49

You're The Man!

Ответить
@prakashdash7549
@prakashdash7549 - 03.10.2017 18:48

Can anybody please tell,,,,, Abstract class can have implementation for some of it's method.. May i know in which case it will not have implementation for any of it's method....

Ответить
@syedwaseemahmed1749
@syedwaseemahmed1749 - 12.09.2017 06:46

(1)Use an interface to design a polymorphic hierarchy for value types.
(2)Use an interface when an immutable contract is really intended.
(3)A well-designed interface defines a very specific range of functionality. Split up interfaces that contain unrelated functionality.
(4)Use interfaces to introduce polymorphic behavior without subclassing and to model multiple inheritance—allowing a specific type to support numerous behaviors.

I dosent understand that above lines.
can you please try explaain me in better way??
with example?
Thnak's

Ответить
@hendesebilisim
@hendesebilisim - 12.06.2017 12:50

Thank you Sİr

Ответить
@amitkavinkar1627
@amitkavinkar1627 - 04.04.2017 21:35

Thank you Sir

Ответить
@IndiaUniteNow
@IndiaUniteNow - 27.11.2016 09:02

sir , an interface can inherited by non abstract class

Ответить
@sravanvenkatesh5989
@sravanvenkatesh5989 - 14.11.2016 21:14

Venkat, you said Abstract class acts as a base class!!! Then How this point from your slide is possible...?
ABSTRACT CLASS CAN INHERIT FROM ANOTHER ABSTRACT CLASS OR ANOTHER INTERFACE.... My Doubt was, how can any class can be a Base class when it is inheriting from another Abstract class or interface??? Can you please let me know

Ответить
@mohit77577
@mohit77577 - 02.10.2016 21:22

Hello venkat,
Can you please explain any real world example of when and where to use interface and abstract class. Also can you please explain dependancy injection.

Thanks

Ответить
@tesfayhabte6580
@tesfayhabte6580 - 29.09.2016 14:53

really really  ur teaching is very helpful thanks so much

Ответить
@kantikh
@kantikh - 22.09.2016 16:01

Please upload a video on sql execution plan.

Ответить
@mulimotola44
@mulimotola44 - 20.08.2016 16:19

Keep in mind that since Java 8 you can implement interface methods with the 'default' keyword

Ответить
@HemanthHemu
@HemanthHemu - 04.08.2016 11:18

"abstract method Must be implemented" is the case when an abstracted is inherited. Is it the same when an interface is inherited and "all the methods should be implemented"? Is it mandatory to implement all the methods of interface as that of abstract class? Thankyou

Ответить
@sendacool88
@sendacool88 - 11.06.2016 21:01

wow what great video :-)

Ответить