Last active
January 27, 2020 23:01
-
-
Save hk1ll3r/e2e0a0ace238b29b5d35acf203de8807 to your computer and use it in GitHub Desktop.
gist 2: call using the shorthand syntax
This file contains hidden or 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
// declare and assign | |
(float x, float y) = GetPosition(); | |
// just assign | |
float x, y; // declare variables elsewhere | |
(x, y) = GetPosition(); | |
// tuple usage (explicit) | |
ValueTuple<float, float> ret = GetPosition(); | |
float x = ret.Item1, y = ret.Item2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment