Skip to content

Instantly share code, notes, and snippets.

@alistairjevans
Last active May 25, 2019 09:50
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/bd36d10719ba0d9d36b48990c468ad28 to your computer and use it in GitHub Desktop.
Save alistairjevans/bd36d10719ba0d9d36b48990c468ad28 to your computer and use it in GitHub Desktop.
KVP with params
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