Created
July 10, 2020 08:57
-
-
Save james-world/85ed6a9d437d0ec7fb65f831439cffd1 to your computer and use it in GitHub Desktop.
Dangers of stand alone discards
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
void Main() | |
{ | |
Test1(5); | |
Test2(5); | |
} | |
void Test1(int _) | |
{ | |
_ = 2 + 2; | |
Console.WriteLine(_); | |
} | |
void Test2(int x) | |
{ | |
_ = 2 + 2; | |
Console.WriteLine(x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment