C# 14 in .NET 10 is amazing
Ed Andersen
0:00 / 0:00
C# 14 in .NET 10 is amazing
77 547 просмотров · 11 месяцев назад
Ed Andersen
60,4 тыс. подписчиков
77 547 просмотров · 11 месяцев назад
Full rundown of new features in C# 14 for .NET 10 Developers.
0:00 intro
0:13 Null-conditional assignment
1:10 field keyword
2:40 User-defined compound assignment operators
4:20 Extension members
5:50 nameof supports unboard generic types
Corrections:
3:48 You could always do this statically, the improvement is now using void on the instance. The following is now possible in C# 14:
public class Channel
{
public int Subscribers { get; set; }
public int Members { get; set; }
public void operator ++()
{
Subscribers++;
Members++;
}
public void operator +=(int amount)
{
Subscribers += amount;
Members += amount;
}
}
See this blog post for the full code: https://www.edandersen.com/p/c-14s-be...
The best courses for .NET developers ➡ https://dometrain.edandersen.com ⭐
#csharp #dotnet #coding