Last active
July 14, 2023 11:34
-
-
Save a-patel/830da50328f40d209fd35372e58e70ab to your computer and use it in GitHub Desktop.
C#.NET - Null Forgiving or Null Suppression Operator (!.) Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example-1 */ | |
// Without null forgiving or null suppression operator | |
string name = null; // WARNING | |
// With null forgiving or null suppression operator | |
string name = null!; // NO WARNING |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment