How to generate string of a certain length to insert into a file to meet a file size criteria?
You can always use the a constructor for string which takes a char and a number of times you want that character repeated: string myString = new string(‘*’, 5000); This gives you a string of 5000 stars – tweak to your needs.