Replies: 2 comments
-
.Net framework likely doesn't have annotations for string.IsNullOrEmpty. I'd recommend you just do nullable testing for your .net8 target. |
Beta Was this translation helpful? Give feedback.
0 replies
-
See also #73823 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version Used: C# 8.0
Steps to Reproduce:
A minimal repro: https://gist.github.com/jozefizso/ff7e0ce119366b1129cb6a0d5fb0edee
Diagnostic Id: CS8602: Dereference of a possibly null reference
Expected Behavior: The code should compile.
Actual Behavior: Compiler fails on
s.Length
expression while thes
variable is reported as not null.Beta Was this translation helpful? Give feedback.
All reactions