Last active
May 25, 2019 09:50
-
-
Save alistairjevans/bd36d10719ba0d9d36b48990c468ad28 to your computer and use it in GitHub Desktop.
KVP with params
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 KeyValuePair<string, string>[] pairs) | |
{ | |
} | |
void Caller() | |
{ | |
// params are great, but I still don't love it. | |
SomeMethod( | |
KVP("key1", "val1"), | |
KVP("key2", "val2") | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment