Тёмный

C# Contravariance 

Coding Tutorials
Подписаться 14 тыс.
Просмотров 3,7 тыс.
50% 1

Coding Tutorial: Got your head around covariance? Here's contravariance - welcome to opposite land!
Source code available at: github.com/JasperKent/Contrav...

Наука

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

 

18 июн 2020

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@CodingTutorialsAreGo
@CodingTutorialsAreGo 4 года назад
Anything you'd like to see a video on? Do ask below. Download the source code at github.com/JasperKent/Contravariance For more videos, subscribe here: ru-vid.com/show-UCqWQzlUDdllnLmtgfSgYTCA
@saqib6659
@saqib6659 2 года назад
amazing explain,always hard understand this concept but you explain very well
@mohitkumar-jv2bx
@mohitkumar-jv2bx 2 года назад
Finally someone who could explain the contravariance and Covariance(in other video) in such a simple and great manner.
@CodingTutorialsAreGo
@CodingTutorialsAreGo 2 года назад
Trouble is, if I try to teach them live in a course I get it wrong, so I usually refer my attendees to these videos.
@aktaruzzamansuman6264
@aktaruzzamansuman6264 Год назад
Great teacher.
@vudshpreyk
@vudshpreyk 2 года назад
Thank you for your great explanations!
@ToddVance
@ToddVance Год назад
I now understand the difference and the hows but the deep WHY still seems to elude me. I guess because of the way things are done, it can break Liskov but wouldnt contra break liskov or is it just the locking down of the one way or another that makes us unable to break Liskov...? Also the delegates that do BOTH Co and Contra confuse me... wouldnt I be able to make something that takes say Fruit both in and out? FOR EXAMPLE: delegate Tout CanIBreakDelegate(T myIn, T myOtherIn); and then in program.cs CanIBreakDelegate canIBreak = (l, r) => new Apple(); so this works just fine but I have no idea what it means, lol...
@CodingTutorialsAreGo
@CodingTutorialsAreGo Год назад
I'll have to have a think about that.
@ToddVance
@ToddVance Год назад
@@CodingTutorialsAreGo thanks!
@CodingTutorialsAreGo
@CodingTutorialsAreGo Год назад
Okay, I've had a think. The thing to remember is that co- and contravariance are about the heritability of the generic itself, no the generic parameter. Let's introduce a second level of inheritance, so Fruit
@BrianGentles
@BrianGentles 2 года назад
Great video, I finally think I get Contravariance in C#. Could you add links between this and your video on Covariance to both videos. Would have made this video much easier to find. Thanks
@OctavianUser
@OctavianUser 2 года назад
Very useful
Далее
C# Covariance
17:27
Просмотров 7 тыс.
Covariance Revisited
18:18
Просмотров 1,1 тыс.
Covariance and Contravariance
13:31
Просмотров 11 тыс.
Implementing IEnumerable
17:35
Просмотров 10 тыс.
C# 12 Primary Constructors
19:44
Просмотров 1,4 тыс.
Blackview N6000SE Краш Тест!
1:00
Просмотров 30 тыс.
ДОМОФОН НА КОМПЬЮТЕР
0:17
Просмотров 597 тыс.