Skip to content

Instantly share code, notes, and snippets.

@alistairjevans
Last active May 25, 2019 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alistairjevans/6549517501024b490840b63bda6e3dd8 to your computer and use it in GitHub Desktop.
Save alistairjevans/6549517501024b490840b63bda6e3dd8 to your computer and use it in GitHub Desktop.
Value Tuples to pass lists
void SomeMethod(params (string key, string value)[] pairs)
{
}
void Caller()
{
// Now that's more like it!
SomeMethod(
("key1", "val1"),
("key2", "val2")
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment