Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Warning CS8600: Converting null literal or possible null value to non-nullable type. #107

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented Feb 12, 2021

In #103 this line was added:

string ev = Environment.GetEnvironmentVariable (envVar);

With NRT, Environment.GetEnvironmentVariable returns string? instead of string, causing the warning:

Warning CS8600: Converting null literal or possible null value to non-nullable type.

We can avoid it by using var instead of string.

@jonpryor jonpryor merged commit 554d45a into main Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants