OOP with derived or abstract classes, overrides | IEnumerable [Pt 19] | C# for Beginners

  Рет қаралды 17,104

dotnet

dotnet

7 ай бұрын

View full playlist: aka.ms/dotnet/beginnervideos/...
Set up C# in VS Code: aka.ms/dotnet/get-started/vscode
🏆Earn the C# Certification: aka.ms/csharp-certification
Let's dive deeper into Object Oriented Programming with our Person/Pet example. We currently have a Person class and a Pet Class. Scott and David build the blueprints to expand our Pet example with base classes, abstract classes, and derived classes.
Links:
.NET Beginner Videos: aka.ms/dotnetvideos
MS Learn: aka.ms/dotnet/beginnervideos/...
Blog: aka.ms/dotnet/blog
Twitter: aka.ms/dotnet/twitter
TikTok: aka.ms/dotnet/tiktok
Mastodon: aka.ms/dotnet/mastodon
LinkedIn: aka.ms/dotnet/linkedin
Facebook: aka.ms/dotnet/facebook
Docs: learn.microsoft.com/dotnet
Forums: aka.ms/dotnet/forums
🙋‍♀️Q&A: aka.ms/dotnet-qa
👨‍🎓Microsoft Learn: aka.ms/learndotnet
#dotnet #csharp

Пікірлер: 45
@gamagetf
@gamagetf 4 ай бұрын
This is literally the best instructional video series on programming I have ever encountered. Please, for the love of all that is holy, keep making these videos!
@cyberducc
@cyberducc 7 ай бұрын
C# has a very elegant syntax 💜
@MrMitri22
@MrMitri22 7 ай бұрын
Thanks for the positive energy! Had a great time with you mates. Personally, I find your pedagogical approach to be highly effective. I greatly appreciated the balance between the little jokes, the beginner-friendly mindset, and the valuable practical advice. I'm impatient to see you in the next C# modul!
@yt_mv
@yt_mv 7 ай бұрын
please keep on going with more, thanks David and Scott !!!
@rezz_code
@rezz_code 4 ай бұрын
among most of the tutorial series in the channel , you guys were the best. thanks for the videos.
@marct8263
@marct8263 7 ай бұрын
Coming from a functional language this has really helped me get my head around OOP and how its implemented in c#
@jamesp1389
@jamesp1389 6 ай бұрын
This was great. You both have a gift for breaking things down. Objects and constructors finally make sense to me!
@WilliamPowerDental
@WilliamPowerDental 7 ай бұрын
Would be good to lead the learner onto next steps... Further courses or ms learn docs.
@HimanshuSharma-wj1jy
@HimanshuSharma-wj1jy 2 ай бұрын
Finished all , The way you two taught is awesome I just couldn't stop. Thanks and All the best , Looking forward for more videos by you two.
@dinindukanchana8554
@dinindukanchana8554 3 ай бұрын
Watched the full series. You are presenting it very well Scott and Fowler. Thank you very much.
@xarmanli
@xarmanli 7 ай бұрын
Great stuff, friends! Keep up the great work.
@Melvinn27
@Melvinn27 6 ай бұрын
Great series. Informative and easy to digest. Thanks guys.
@Ricebow11
@Ricebow11 18 күн бұрын
What would be the NEXT best playlist to watch after finishing "C# for Beginners"? I definitely learned a lot from those two awesome instructors.
@jarnenrichard7375
@jarnenrichard7375 6 ай бұрын
Thank you guys, learnt new styles/techniques here,, awesome stuff
@drgabi18
@drgabi18 4 ай бұрын
This was a fun series, thanks for the videos!
@whisperscribe
@whisperscribe Ай бұрын
Wish you guys went all in for all the rest of C# features, really great content
@erhanalankus
@erhanalankus 7 ай бұрын
Great series. Thanks!
@WyattHaley-un7wu
@WyattHaley-un7wu 25 күн бұрын
Great series, thanks guys
@amjedalsadig2647
@amjedalsadig2647 3 ай бұрын
That was terrific. Thank you for the effort. I would really appreciate it if you suggested some follow-up projects to strengthen the knowledge and hopefully, help us learn more
@browsermage
@browsermage 4 ай бұрын
Thank you for the playlist 💫💫
@vickyRevelli
@vickyRevelli Ай бұрын
Thank you David and scott
@ntsikelelondleleni6335
@ntsikelelondleleni6335 7 ай бұрын
I enjoyed this series
@kenjohnsiosan9707
@kenjohnsiosan9707 2 ай бұрын
Thank you for this wonderful intro. :)
@levmedvedev
@levmedvedev 13 күн бұрын
Thanks guys! That's very inspiring! )
@bilkisuismail6096
@bilkisuismail6096 5 ай бұрын
This series is great, i enjoyed it an learnt a lot from it. Please can we get more lessons. Anyone can definitely learn programming from you guys. Thank you
@Xinmin1000
@Xinmin1000 6 ай бұрын
very helpful. please keep going😀
@CruzCastillo-pm9qs
@CruzCastillo-pm9qs 5 күн бұрын
Great!! keep up the good work!
@faithappoh
@faithappoh 5 ай бұрын
Awesome content
@ronphil6666
@ronphil6666 3 күн бұрын
Great series thanks, but this last one was tough for me, to be honest
@kodindoyannick5328
@kodindoyannick5328 3 ай бұрын
Thank so much.
@mr_don_key
@mr_don_key 3 ай бұрын
I think it would be more useful (in terms of learning), to use a concrete (real life) business case to solve. E.g. a real usable to-do list, or a notepad, or a calculator or whichever suitable application. All this from A to Z (X-Y-Z being an advanced, with modern writing/refactoring videos). Also show what happens when not using good/best practices. E.g. show the exploit, show what happends in the real application. by doing this, i think people will understand the language better, and concepts behind it too. Instead of vague, non realistic, abstract use cases.
@HugoCostaaa
@HugoCostaaa Ай бұрын
Amazing
@bernpaul9868
@bernpaul9868 7 күн бұрын
Sir please add more c# tutorial
@bilalbyte
@bilalbyte 5 ай бұрын
Please upload some more videos on advanced topics
@donireland6218
@donireland6218 4 ай бұрын
Very cool explanation. Using your example, how would you deal with pets that don't make noise (lizards, corn snakes etc)? Would those types of pets not have a MakeNoise method? Or would you use some other way of dealing with the question?
@Nobiotera
@Nobiotera 2 ай бұрын
I saw your comment and tried to find an answer. I made it work by putting it like this : public override string MakeNoise() => null; I'm kinda late but hope it may help
@DB42YT
@DB42YT 2 ай бұрын
It's "Beyoncé"!
@fyu5991
@fyu5991 5 ай бұрын
since we can't create a Pet instance why is the constructor (string firstname) for?
@atulkrjha
@atulkrjha 3 ай бұрын
According to the inheritance principle. First base class constructor will be called and it will initialize the firstname property to the name passed.
@nwngenisys8969
@nwngenisys8969 5 ай бұрын
This is too abstract for me... :P
@kking999
@kking999 4 ай бұрын
what is next ? which lesson we can take further ?
@kking999
@kking999 4 ай бұрын
the lesson was difficult for me , I don't undertand why they made Pet list in the person class, they should made the dog list or can in person class ?
@gower1973
@gower1973 4 ай бұрын
If you just created a list of dogs you could only ever add dogs, by creating a list of the base class you can create an object of any derived class in this case Cats or Dogs you cant create an instance called Pet because its abstract
@ellisrichards3381
@ellisrichards3381 2 ай бұрын
I hope that helps this vid make sense. The List is a generic Type collection. Meaning if you made a list of Dog then only Dogs could go in the list. But since they made cat and dog derived from the pet class, dogs and cats can both be placed in the same generic list of pets. It’s the beauty of inheritance in OOP.
@kvelez
@kvelez 7 ай бұрын
var me = new Person("Kevin", "Velez", 19); me._pets.Add(new Dog("Bobby")); me._pets.Add(new Dog("Toby")); me._pets.Add(new Cat("Whiskers")); me._pets.ForEach(pet => Console.WriteLine(pet)); public class Person(string name, string lastname, int age) { public string _name { get; set; } public string _lastname { get; set; } public int _age { get; set; } public List _pets { get; set; } = new(); } public abstract class Pet(string name) { public string _name { get; set; } public abstract string MakeNoise(); public override string ToString() => $"{_name} is a {GetType().Name}"; } public class Dog(string name) : Pet(name) { public override string MakeNoise() => "bark"; } public class Cat(string name) : Pet(name) { public override string MakeNoise() => "meow"; }
LINQ Method Syntax vs Query [Pt 17] | C# for Beginners
7:57
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 35 МЛН
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 56 МЛН
Writing async/await from scratch in C# with Stephen Toub
1:06:02
Abstract Classes and Methods in Java Explained in 7 Minutes
7:00
Coding with John
Рет қаралды 485 М.
"Stop Using Async Await in .NET to Save Threads" | Code Cop #018
14:05
How IEnumerable can kill your performance in C#
11:02
Nick Chapsas
Рет қаралды 113 М.
Sorting and Searching Lists [Pt 14] | C# for Beginners
8:15
Fundamental Concepts of Object Oriented Programming
9:16
Computer Science
Рет қаралды 858 М.
How To Create Generics in C#, Including New Features
38:51
IAmTimCorey
Рет қаралды 41 М.
Asus  VivoBook Винда за 8 часов!
1:00
Sergey Delaisy
Рет қаралды 1,1 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 33 МЛН
Best mobile of all time💥🗿 [Troll Face]
0:24
Special SHNTY 2.0
Рет қаралды 322 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 7 МЛН
CY Superb Earphone 👌 For Smartphone Handset
0:42
Tech Official
Рет қаралды 826 М.