What's New in C# 8.0 - Is There Multi-Inheritance Now?

What's New in C# 8.0 - Is There Multi-Inheritance Now?

IAmTimCorey

4 года назад

61,733 Просмотров

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


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

@SuperDre74
@SuperDre74 - 14.08.2023 17:42

I really don't understand the thinking about the range with 'up till', when every single 'range' in most languages it is 'up including', so why the sudden change in expected behaviour?
Normally when you see [1..4] you'd expect 1, 2, 3 and 4 not 1, 2 and 3.

Ответить
@vssang4035
@vssang4035 - 17.03.2023 06:34

Tim, this a great video on the new features - although Im a bit late bc I'm relearning c# after a 15 year hiatus. I just finished the Mastercourse and I'm glad I happened to found this. Thank you!

Ответить
@patwhite6026
@patwhite6026 - 27.11.2022 13:59

Thanks Tim, much appreciated

Ответить
@cshashishekhar9702
@cshashishekhar9702 - 23.10.2022 09:05

Hi Tim, Between 30.15 - 30.18 you used “cart” twice in lines 11 and 17 however you should have used “cart2” at line 17 then the result might have been as predicted?

Ответить
@azeezabrahams9427
@azeezabrahams9427 - 01.04.2022 00:12

It feels like Default Interface methods break O in SOLID

Ответить
@cgtd2980
@cgtd2980 - 26.03.2022 17:01

bro, you aren't sending source code. unsubscribing

Ответить
@adityarane2758
@adityarane2758 - 08.11.2021 11:30

Another Important Video !!!

Ответить
@sagiv3106
@sagiv3106 - 23.10.2021 15:30

Is C# 8.0 available only in .NET core or also in .NET framework?
As of 2021

Ответить
@dgroh
@dgroh - 02.08.2021 12:14

I like the default interface method feature, but I think this encourages developers to write bad code. I see as a solution for this versioning. just create a folder v2 for example with the same interface but in different namespace. I would only use default interface method where versioning is not possible. greate video as always!

Ответить
@renzocoppola4664
@renzocoppola4664 - 04.07.2021 14:03

well... i was hyped until i realised i should need to cast it as the interface

Ответить
@shmoola
@shmoola - 19.06.2021 15:24

I would guess the motivation behind using [^1] instead of [^0] is to follow convention established by other languages (such as Python). However using [-1] would have allowed various mistakes in index calculation to resurface. Hence they used a different char for "negative" indices while keeping the convention

Ответить
@manojthecoder412
@manojthecoder412 - 09.04.2021 20:10

Well I spent 10 years in c# programming. Loved the video.

Ответить
@fabienjt406
@fabienjt406 - 03.04.2021 15:42

Thanks a lot! That's pretty clear!

Ответить
@vibhoregupta1742
@vibhoregupta1742 - 30.03.2021 10:44

Hi Tim, really want to appreciate your effort here, these videos are super-helpful. I have one question though, providing default implementation to interface methods frees the class from implementing it, doesn't it violates the interface segregation principal? This way interfaces can easily bloat in a very short period and classes dont care as they dont have to implement them? What are your thoughts on this?

Ответить
@ethancheung1676
@ethancheung1676 - 20.03.2021 15:22

I think the default interface implementation is a nice alternative to extension methods (on interface). Also an up side is the class can have their own implementation if they beg a difference with the “extension method”.

Ответить
@piotrw3366
@piotrw3366 - 19.03.2021 20:13

Great video! Thank you very much for creating it!
No. 2 default interface method - as I understand it is useful when a method receives object of type IShoppingCart already but now it needs to do something else, and you already have a tone of classes implementing this interface?

Ответить
@vartikagupta8816
@vartikagupta8816 - 22.02.2021 18:22

Your tutorials are just the best Tim! Easy to understand and rich in information. You have a fan here!!

Ответить
@zealtypedcode3119
@zealtypedcode3119 - 18.02.2021 01:29

I think default interface complicate things more with serious problems and bugs

Ответить
@paulminshall8793
@paulminshall8793 - 26.01.2021 02:25

Implementation in an interface definition? Inconceivable!

Ответить
@Sean-hd1bp
@Sean-hd1bp - 16.12.2020 22:47

Thanks!

Ответить
@movsar42
@movsar42 - 09.11.2020 15:40

I think default implementations in interfaces is a very bad idea.

Ответить
@movsar42
@movsar42 - 09.11.2020 14:10

Please explain what and why of defensive copy

Ответить
@timnguyen8190
@timnguyen8190 - 21.10.2020 20:13

Thanks Tim! Love your videos!

Ответить
@ajhanaimu2343
@ajhanaimu2343 - 12.09.2020 04:11

lost interest at 5min in. really talk about what is new. I don't know why people explain stuff outside the main subject which is stupid for people looking for such subject. Did you think I'm looking for what is new in C# 8 while I don't know the deference between language and framework?!...

Ответить
@EricHarmon67
@EricHarmon67 - 06.09.2020 02:43

I am feeling ill today, so I'm lying on the sofa, catching up with a bunch of IAmTimCorey videos for fun. I thought I'd watch this one. I was curious about the default implementation of methods in interfaces. You mention that they don't cause a breaking change in the IShoppingCart example, but I see it as a breaking change, and here's why: The implementation of the interface (namely, the ShoppingCart class) doesn't break, it's true, but calling code could break. What if you had calling code like this: if (TheCart is IShoppingCart cart) { cart.CalculateSubTotal(); cart.CalculateTotal(); }? If CalculateSubTotal() needs to do something in order for the subtotal to display correctly in the UI, then ShoppingCart won't work properly. I realize that in that case, I shouldn't use a default implementation for CalculateSubTotal, but I'm struggling to find any case in which I wouldn't be testing the class from calling code to see if it supports an interface. The only case I can come up with is something like, say, double CalculateTax(), where there's usually no tax, and in that case my default implementation could return 0. Still, though, it's a source of bugs for my code if I forget to update the TenPercentTax class to override CalculateTax() and return SomeAmount * 0.10. I guess my point is, if the default implementation ever is incorrect, then I've got potential unforseen bugs in my code, and therefore, not using a default implementation forces me to address all classes that implement the interface. You could argue, correctly, that any code change is a potential source of bugs; I just see this one as inviting trouble, I guess. Just my two cents, and I realize not everyone will agree!

Ответить
@bryanpaderes8963
@bryanpaderes8963 - 01.09.2020 22:15

Thank you. Your videos are great. It helps me a lot

Ответить
@jabuci
@jabuci - 07.08.2020 13:27

When you write names[1..] for instance, what does it return? Is it just a view on the original array, or is it a new array object?

Ответить
@stephenyork7318
@stephenyork7318 - 22.07.2020 20:38

.net doesn’t “Compile the c#”. It’s a framework library to do useful things with c#

Ответить
@nodetransit4277
@nodetransit4277 - 26.06.2020 13:48

some of these new features give the programmers more possibilities to practice writing bad code and end up eventually with unmaintainable code

Ответить
@windowsbuilderthegreat3121
@windowsbuilderthegreat3121 - 11.06.2020 14:31

Wouldn’t having default implementation of an interface defeat the purpose of interfaces because they are abstract

Ответить
@alexeys1723
@alexeys1723 - 07.06.2020 12:47

Thanks

Ответить
@anthoniG
@anthoniG - 06.06.2020 01:16

Anyone think that switch expressions look a lot like Rust's match expression?

Ответить
@abdallabenomran6809
@abdallabenomran6809 - 27.05.2020 11:40

We need a video about C# 9 please Tim . thanks always

Ответить
@sergeymigel4680
@sergeymigel4680 - 11.04.2020 18:47

Thank you!

Ответить
@inohope
@inohope - 05.03.2020 09:42

I don't understand this using statement without curly braces. As I understand "the old way", it will tell GC explicitly when the variable is out of scope so it can proceed disposing it. But without braces, GC has to decide on its own when the variable is out of scope. So, how is that different opposed to not having using statement at all?

Ответить
@kevinison3740
@kevinison3740 - 13.02.2020 17:09

Do you have to be a paid subscriber in order to download the source code?

Ответить
@Layarion
@Layarion - 10.02.2020 12:35

switch expressions seem very nice.

Ответить
@pavelernestonavarroguerrer7871
@pavelernestonavarroguerrer7871 - 20.01.2020 04:38

Hi, excelent video. A question: you are introducing the Diamond Problem with this Default Interface Members. How's C# is going to handle this?

Ответить
@TechofthedayByNK
@TechofthedayByNK - 18.01.2020 15:11

I started my own channel after being inspired by you. Thanks!

Ответить
@tarsala1995
@tarsala1995 - 23.12.2019 13:55

I'm on 12th minute and I already subscribed! Damn he is good at sharing the knowledge

Ответить