Skip to content

Instantly share code, notes, and snippets.

@hk1ll3r
Last active January 27, 2020 23:01
Show Gist options
  • Save hk1ll3r/e2e0a0ace238b29b5d35acf203de8807 to your computer and use it in GitHub Desktop.
Save hk1ll3r/e2e0a0ace238b29b5d35acf203de8807 to your computer and use it in GitHub Desktop.
gist 2: call using the shorthand syntax
// 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