Skip to content

Instantly share code, notes, and snippets.

@alistairjevans
Last active May 25, 2019 09:49
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/537163d8e44965227a153c77e841df9e to your computer and use it in GitHub Desktop.
Save alistairjevans/537163d8e44965227a153c77e841df9e to your computer and use it in GitHub Desktop.
Array KVP - steady improvement
void SomeMethod(KeyValuePair<string, string>[] pairs)
{
}
void Caller()
{
// Ok, so I hate myself a little less
SomeMethod(new[]
{
KVP("key1", "val1"),
KVP("key2", "val2")
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment