Тёмный

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

dotnet
Подписаться 294 тыс.
Просмотров 20 тыс.
50% 1

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

Наука

Опубликовано:

 

9 ноя 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 56   
@gamagetf
@gamagetf 5 месяцев назад
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!
@nxxd
@nxxd 21 день назад
I would like to echo this exact sentiment. David and Scott, you're both great and I really hope to see more videos of you together!
@MrMitri22
@MrMitri22 8 месяцев назад
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 8 месяцев назад
please keep on going with more, thanks David and Scott !!!
@cyberducc
@cyberducc 8 месяцев назад
C# has a very elegant syntax 💜
@shwetabhagat8920
@shwetabhagat8920 17 дней назад
got a good understanding of C#, thanks and great work David and Scott🙌🙌
@asd14312
@asd14312 7 дней назад
Thank you very much, the last two videos about OOP were really helpful!
@rezz_code
@rezz_code 5 месяцев назад
among most of the tutorial series in the channel , you guys were the best. thanks for the videos.
@jamesp1389
@jamesp1389 7 месяцев назад
This was great. You both have a gift for breaking things down. Objects and constructors finally make sense to me!
@AthelstanEngland
@AthelstanEngland 13 дней назад
02:15 I know this is rehearsed but the "oh crap" was heartfelt!! :) an acting profession awaits when AI takes over programming!! :)
@himanshu.g345
@himanshu.g345 21 день назад
Thank you, Scott and David. You have cleared up a basic concept related to abstraction that I struggled with in college.
@marct8263
@marct8263 8 месяцев назад
Coming from a functional language this has really helped me get my head around OOP and how its implemented in c#
@dinindukanchana8554
@dinindukanchana8554 4 месяца назад
Watched the full series. You are presenting it very well Scott and Fowler. Thank you very much.
@HimanshuSharma-wj1jy
@HimanshuSharma-wj1jy 3 месяца назад
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.
@poeeiphyu6931
@poeeiphyu6931 День назад
Thank you David and scott
@WilliamPowerDental
@WilliamPowerDental 8 месяцев назад
Would be good to lead the learner onto next steps... Further courses or ms learn docs.
@AthelstanEngland
@AthelstanEngland 13 дней назад
Excellent series.
@xarmanli
@xarmanli 8 месяцев назад
Great stuff, friends! Keep up the great work.
@Melvinn27
@Melvinn27 7 месяцев назад
Great series. Informative and easy to digest. Thanks guys.
@Ricebow11
@Ricebow11 Месяц назад
What would be the NEXT best playlist to watch after finishing "C# for Beginners"? I definitely learned a lot from those two awesome instructors.
@drgabi18
@drgabi18 5 месяцев назад
This was a fun series, thanks for the videos!
@amjedalsadig2647
@amjedalsadig2647 4 месяца назад
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
@jarnenrichard7375
@jarnenrichard7375 7 месяцев назад
Thank you guys, learnt new styles/techniques here,, awesome stuff
@WyattHaley-un7wu
@WyattHaley-un7wu Месяц назад
Great series, thanks guys
@erhanalankus
@erhanalankus 8 месяцев назад
Great series. Thanks!
@whisperscribe
@whisperscribe 2 месяца назад
Wish you guys went all in for all the rest of C# features, really great content
@levmedvedev
@levmedvedev Месяц назад
Thanks guys! That's very inspiring! )
@browsermage
@browsermage 5 месяцев назад
Thank you for the playlist 💫💫
@kenjohnsiosan9707
@kenjohnsiosan9707 3 месяца назад
Thank you for this wonderful intro. :)
@bilkisuismail6096
@bilkisuismail6096 6 месяцев назад
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
@ntsikelelondleleni6335
@ntsikelelondleleni6335 8 месяцев назад
I enjoyed this series
@CruzCastillo-pm9qs
@CruzCastillo-pm9qs Месяц назад
Great!! keep up the good work!
@Xinmin1000
@Xinmin1000 7 месяцев назад
very helpful. please keep going😀
@faithappoh
@faithappoh 6 месяцев назад
Awesome content
@Dariansweb
@Dariansweb 15 дней назад
I am not certain where to go from here. I'd like to continue learning more in deptch about each of the concepts taught n this videos. I am reading all the documentation on the MS Learn but would like additional videos that supplement these in the Playlist. Any suggestions? I don't want to go off into different areas before I get more stable here, like... don't send me to Blazor or Entity Framework, etc.
@kodindoyannick5328
@kodindoyannick5328 4 месяца назад
Thank so much.
@HugoCostaaa
@HugoCostaaa 2 месяца назад
Amazing
@mr_don_key
@mr_don_key 4 месяца назад
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.
@bernpaul9868
@bernpaul9868 Месяц назад
Sir please add more c# tutorial
@ronphil6666
@ronphil6666 Месяц назад
Great series thanks, but this last one was tough for me, to be honest
@senuhy
@senuhy 23 дня назад
What was the tough part in it? maybe I can help
@krishnareddyyerram4615
@krishnareddyyerram4615 20 дней назад
Super
@bilalbyte
@bilalbyte 6 месяцев назад
Please upload some more videos on advanced topics
@donireland6218
@donireland6218 6 месяцев назад
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 4 месяца назад
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
@fyu5991
@fyu5991 6 месяцев назад
since we can't create a Pet instance why is the constructor (string firstname) for?
@atulkrjha
@atulkrjha 4 месяца назад
According to the inheritance principle. First base class constructor will be called and it will initialize the firstname property to the name passed.
@DB42YT
@DB42YT 3 месяца назад
It's "Beyoncé"!
@ShreyanshiTimes
@ShreyanshiTimes 21 день назад
Now the list initilizers are too impressive, all you need to place is [] instead of new();
@nwngenisys8969
@nwngenisys8969 6 месяцев назад
This is too abstract for me... :P
@kking999
@kking999 5 месяцев назад
what is next ? which lesson we can take further ?
@kking999
@kking999 5 месяцев назад
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 5 месяцев назад
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 3 месяца назад
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 8 месяцев назад
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"; }
@vickyRevelli
@vickyRevelli 2 месяца назад
Thank you David and scott
Далее
🛑 до конца!
00:12
Просмотров 26 тыс.
Ouch.. 🤕
00:30
Просмотров 8 млн
Nullable Types In C# | #Vcreationstech
7:40
Просмотров 2,6 тыс.
Hello World! [Pt 2] | C# for Beginners
6:03
Просмотров 85 тыс.
Part 3   Why and when should we use an abstract class
20:29
What's New in C# 12 | .NET Conf 2023
35:28
Просмотров 55 тыс.
ЗАБЫТЫЙ IPHONE 😳
0:31
Просмотров 20 тыс.
НЕ БЕРУ APPLE VISION PRO!
0:37
Просмотров 372 тыс.