Is there a more elegant solution for adding an item to an IEnumerable than this
myNewIEnumerable = myIEnumerable.Concat ( Enumerable.Repeat (item, 1) );
?
Some context:
public void printStrings (IEnumerable<string> myStrings) {
Console.WriteLine ("The beginning.");
foreach (var s in myStrings) Console.WriteLine (s);
Console.WriteLine ("The end.");
}
...
var result = someMethodDeliveringAnIEnumerableOfStrings ();
printStrings (result.Concat ( Enumerable.Repeat ("finished", 1) ) );