Closed william-gross closed 4 months ago
An example of it causing a problem would be helpful. If you want to rename it to ConcatIndividualItem we could see how that goes.
I did the rename, to ConcatItems
. And for reference, here are the problems I saw with this when it was an overload:
.Concat()
, with no arguments, which is probably a mistake.var original = new List<int> { 1, 2 };
var hasFour = original.Concat( [ 3, 4 ] );
// Now we're making each element a pair, and will accidentally end up with three total items instead of four.
var modified = new List<int[]> { new[] { 1, 0 }, new[] { 2, 0 } };
var shouldHaveFourButWontBreak = modified.Concat( [ 3, 4 ] );
It appears to be error-provocative. If this method is important, I'd support restoring it under a different name.