You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Language Reference: Document null forgiveness operator (!) #13420
So, the null-forgiveness operator either goes to that overview OR to the separate, its own page. As far as I understand, one can use the ! operator not only when "member-accessing".
#14727 does mention the ! operator, but doesn't completely address it. I'm reopening this issue.
I think this should be a separate page in the operators section. I'd put it after ?. and ??= in the TOC. Per the comment on #14727:
it's not only about member access and more about declaration rather than operation (as far as I understand, x and x! generate the same code at the end?)
That's correct, there's no runtime difference between x and x!. It's only going to affect static analysis. (One implication of that fact is that null! is legal, and sometimes the right solution).
Activity
pkulikov commentedon Jul 16, 2019
@BillWagner if by the "nullable conditional operators" you mean the
?.and?[]operators, then those are in one overview with the member access operators:https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators
So, the null-forgiveness operator either goes to that overview OR to the separate, its own page. As far as I understand, one can use the
!operator not only when "member-accessing".BillWagner commentedon Sep 29, 2019
#14727 does mention the
!operator, but doesn't completely address it. I'm reopening this issue.I think this should be a separate page in the operators section. I'd put it after
?.and??=in the TOC. Per the comment on #14727:That's correct, there's no runtime difference between
xandx!. It's only going to affect static analysis. (One implication of that fact is thatnull!is legal, and sometimes the right solution).BillWagner commentedon Sep 29, 2019
Interesting GitHub side effect. The phrase "I'd be happy to fix #nnnn" appears to have triggered the closing of this issue.
pkulikov commentedon Sep 30, 2019
@BillWagner thanks for the reply. Let it be a separate page. I can work on this next week. If it's fine with you, please assign this issue to me.
Indeed, next time I will be more careful with the word "fix" :)
mairaw commentedon Sep 30, 2019
Yep, that's one of the magical words: https://help.github.com/en/articles/closing-issues-using-keywords#about-issue-references