Yes, ideally, it would be called Append, but since Concat is already there in LINQ, it would makes single-item overload more naturally discoverable. I would be more inclined to use the name ConcatOne if it is important to have the implementation detail in the face. In real practice, I've never been confused because your variable naming will naturally remove any confusion. For example, is there any question about what's going on here?
rows.Concat(row)
So if you have sensible variable names, the plurality and singularity will help with semantics.
I've used both, Concat and Prepend, in practice and belive it or not, I've had more issues with Prepend because the code ends up reading backwards. Case in point:
columns.Prepend("Time").Prepend("Date");
Here, I'm trying to add date and time to an existing set of columns. If I want date to appear before time, it has to be prepended last. Of course, the sensible way to write this would be to use Concat:
new[] { "Date", Time" }.Concat(columns);
Unfortunately, if you're in the middle of a long chaining of operators, this is not always possible. I can expand further if you like.
- Atif