Skip to content

@ChrisMissal /anonTuple.cs
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Not sure what this is called, anonymous tuple?
// I want to be able to do this in C#
int a = 4;
int b = 2;
(a, b) = (b, a); // swap values
// ... and used in some terribly named methods...
public void AssignValues()
{
var (id, name) = GetValues();
// more statements
}
public int, string GetValues()
{
return (123, "gist");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.