I need to concatenate 3 files using C#. A header file, content, and a footer file, but I want to do this as cool as it can be done.
Cool = really small code or reall
I would go this route...
FileStream fStream = new FileStream("outputpath", FileMode.Append);
foreach (string item in new string[] { "file1", "file2", "file3" })
fStream.Write(File.ReadAllBytes(item));
fStream.Close();
Not file size dependent, no concatenation, and avoiding any possible encoding/decoding issues by reading/writing bytes.