What's new in C#

Sign in to queue

Description

Learn about the new features available in C# 7.1 and 7.2, including async Main, default literals, ref extension methods, in parameters and more. Also get a glimpse of the future with nullable reference types.


Product info: www.dot.net
Learn more: docs.microsoft.com/en-us/dotnet/csharp/
Documentation: docs.microsoft.com/en-us/dotnet/csharp/whats-new/

For more information, check out this course on Microsoft Virtual Academy:

Tags:

.NET, C#

Day:

0

Session Type:

On-demand

Code:

T122

Embed

Download

Download this episode

Download captions

For more information, check out this course on Microsoft Virtual Academy:

The Discussion

  • User profile image
    olmo

    Yeah! C# non-nullable reference types :D

  • User profile image
    GiddyUp​Horsey

    This nullable reference types feature looks great! I'm excited for C# 8 :)

  • User profile image
    Gysmo

    I get the feeling that building existing code in C# 8.x with the nullable reference types may not work that well. There are a lot of default constructors out there with reference members. I can see a lot of ?s being typed before code builds.

  • User profile image
    Dmitry Tabakerov

    Beautiful! C# feels more and more comfortable as it's evolving. Looks like you manage to keep that right balance.

  • User profile image
    RaReRa

    I would prefer "readonly ref" instead of "in" for method parameters.

    That would be more readable (immediately obvious) and consistent to the return parameters.

  • User profile image
    Mar

    Great!!

  • User profile image
    J Pau

    Amazingly described

  • User profile image
    MickBLang

    Null reference types look great for new projects, however I'm not so sure how well this will play with existing code.

  • User profile image
    MhAlan

    Thank you so much, I wish all your videos be short and extensive like this, especially Xamarin guys (too much of talk very little of information)

  • User profile image
    Stannieman

    @Gysmo:

    I get the feeling that building existing code in C# 8.x with the nullable reference types may not work that well. There are a lot of default constructors out there with reference members. I can see a lot of ?s being typed before code builds.



    As mentioned this causes warnings, not errors => you code will build just fine. I do agree however that it's nice if you start with a new project. Even existing projects, even small ones, you probably get 1 billion warnings, making it quite annoying.

  • User profile image
    xofz

    The 'in' keyword for struct method parameters sounds really, really nice.  Unsure if it should be renamed, but hopefully will throw a compiler error for reference types.

  • User profile image
    Rennan24

    Man, C# is looking better and better every year! I can't wait to see what C# 8.0 is going to bring to the table, especially considering how awesome nullable reference types look. Keep up the good work! 👍

Add Your 2 Cents