Append

Append is used to add a single element to the end of a sequence.


If you have a list of products and want to append a new product to the end:

var products = new List<string> { "Product1", "Product2", "Product3" };
var newProduct = "Product4";


var updatedProducts = products.Append(newProduct);


foreach (var product in updatedProducts)
{
    Console.WriteLine(product);
}