Created
March 9, 2017 20:26
-
-
Save MadsTorgersen/f6c61b60a81b872140e6f4d7ca7de377 to your computer and use it in GitHub Desktop.
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
p.GetCoordinates(out var x, out _); // I only care about x |
I also had the same thought, @abelenky.
If _
was declared. It works like pre C# 7.0.
The _
is a discard in C# 7.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm under the impression that _ is a valid variable name by itself, which would make this code ambiguous:
See : https://msdn.microsoft.com/en-us/library/gg615485%28v=vs.88%29.aspx#Variables The section on "Variable Naming"