Last active
May 25, 2019 09:51
-
-
Save alistairjevans/6549517501024b490840b63bda6e3dd8 to your computer and use it in GitHub Desktop.
Value Tuples to pass lists
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
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