Skip to content

Conversation

@daxian-dbw
Copy link
Member

When the Nullable<T>.HasValue check is necesary, we should keep using Nullable<T>.Value after the check. Comparing to Nullable<T>.GetValueOrDefault(), it's semantically more clear that "I want the current value, not the default value" in this case.

Therefore, revert PR #13793 as agreed in #13791 (comment)

@ghost ghost assigned iSazonov Nov 18, 2020
@iSazonov iSazonov added the CL-NotInBuild Indicates that a PR is reverted and not part of the build. label Nov 19, 2020
@iSazonov iSazonov merged commit 40cbee4 into master Nov 19, 2020
@iSazonov iSazonov deleted the revert-13793-georgettica/change-nullable-usage branch November 19, 2020 03:15
@iSazonov iSazonov added this to the 7.2.0-preview.2 milestone Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-NotInBuild Indicates that a PR is reverted and not part of the build.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants