I am creating a method in C# which generates a text file for a Google Product Feed. The feed will contain upwards of 30,000 records and the text file currently weighs in at
Just move the using statement so it encompasses the whole of your code, and write directly to the file. I see no point in keeping it all in memory first.