Thursday, 6 December 2018

C# 8.0 and Project-wide nullable reference types

C# 8.0 is available for use in Visual Studio 2019 Preview.  Mads Torgersen explains some of the key features in this video.

He explains how to enforce usage in a single file using

#nullable enable

What Mads doesn't explain is how to fully accept the new Nullable Reference Types for your entire project.

The secret is to add this to your .csproj file:

<NullableReferenceTypes>true</NullableReferenceTypes>

It goes here:


Now your whole project enforces nullable reference types!

Credit to this Reddit comment.

8 comments:

  1. Damn so cool just yesterday found this site and today I know what's what
    good best online casino sites Now plans to sit here all your free time and fun and productive

    ReplyDelete
  2. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..

    Tableau online training

    ReplyDelete
  3. You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us

    ReactJS Online Training

    ReplyDelete
  4. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    msbi online training

    ReplyDelete
  5. This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
    Sql server dba online training

    ReplyDelete
  6. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information.
    Oracle DBA Online Training

    ReplyDelete
  7. Useful information.I am actual blessed to read this article.thanks for giving us this advantageous information.I acknowledge this post.and I would like bookmark this post.Thanks
    Software testing online training
    Software testing certification training
    Software testing online course
    Software testing training course

    ReplyDelete