The easiest way is the following code:
var content = new string('A', fileSizeInKB);
You now have a row with as many A as required.
To populate it with Lorem Ipsum or some other duplicate line, create something like the following pseudocode:
string contentString = "Lorem Ipsum..."; for (int i = 0; i < fileSizeInKB / contentString.Length; i++) //write contentString to file if (fileSizeInKB % contentString.Length > 0) // write remaining substring of contentString to file
Edit: if you save in Unicode, you may need half the number of files, because unicode uses two bytes per character, if I remember correctly.
Florian von Spiczak Feb 17 2018-11-17T00: 00Z
source share