question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use c# 8.0 and enable nullable reference

See original GitHub issue

You can enable c# 8.0 and Nullable reference types with dotnet core 2.2 . Just add lines below to the project file:

<PropertyGroup>
  <LangVersion>8.0</LangVersion>
  <Nullable>enable</Nullable>
  <!-- NullableContextOptions will be replaced by Nullable in dotnet core 3.0 -->
  <NullableContextOptions>enable</NullableContextOptions>
</PropertyGroup>

Handling nullable is a very important part of this lib. I with it could work smoothly with the new “Nullable reference types”. And I with this lib can support something like Option<string?>.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

14reactions
louthycommented, Jul 24, 2019

Yes, it’s on my list 😃

2reactions
StefanBertelscommented, Oct 24, 2019

Just my 2 pence: I like the library features for Option<T> especially things like LINQ support (bind). C# 8 will make nullables safer but I personally think that I want to stay with Option<T>. This way I can use e.g. Sequence and Traverse in a very generic way.

I guess it will be very hard to make T? work like Option<T>. Maybe we could allow implicit casting from T? to Option<T> and maybe back (?).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nullable reference types
Nullable reference types refers to a group of features enabled in a nullable aware context that minimize the likelihood that your code causes ......
Read more >
Working With Nullable Reference Types In C# 8.0
This article explains how to work with Nullable reference types in C# 8.0 and demonstrates how to use it in application development.
Read more >
Nullable reference types in C# 8.0
Nullable reference types are a new feature in C# 8.0. They allow you to spot places where you're unintentionally dereferencing a null value ......
Read more >
How to enable Nullable Reference Types feature of C# 8.0 ...
To enable Nullable Reference Types for all code in a project, add the following to its .csproj file:
Read more >
Nullable Reference types in C# – Best practices
In C# 8, nullable reference types use the same syntax to give the option of declaring reference types as nullable (i.e. allowing a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found