Inspired by underscorejs and lowdash, this is a C# version