Why can't the C# compiler detect that this can't be null?

Subscribers:
4,110
Published on ● Video Link: https://www.youtube.com/watch?v=_hlfhFPbVq4



Duration: 3:49
10 views
0


Why can't the C# compiler detect that this can't be null?
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA |
Thanks to all those great people for their contributions!

(stackoverflow.com/users/15679808/kyle-k)Kyle K |
(stackoverflow.com/users/5133585/sweeper)Sweeper |
(stackoverflow.com/users/8656043/orkad)Orkad |
(stackoverflow.com/users/71141/etienne-de-martel)Etienne de Martel |
A special thanks goes out to the (https://stackoverflow.com/questions/74510269/why-cant-the-c-sharp-compiler-detect-that-this-cant-be-null)Stackexchange community |

I wish you all a wonderful day! Stay safe :)

c#







Tags:
c#