-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Shortcut for "object == null" #2525
Comments
For the former you can use |
Or |
And of course, when we get nullable reference types with C# 8, the need to scatter |
You can to use ?? ?: ?. |
Duplicate of #545, which was closed. |
@yaakov-h you are right. I closed the duplicated issue. ToAll: Thanks for your answers ! |
I very oftend use "if(Object == null) or if(Object != null)" in my sourcecode.
It would be great to have a shortcut like "if(?Object)" for that.
The return value would be "true" if the Object exists (not null) or "false" if the object doesn't exist (is null)
The text was updated successfully, but these errors were encountered: