Look at NuGet package Bogus
Create a dummy class
public class LineItem
{
public string Value { get; set; }
public override string ToString() => Value;
}
Then as a conceptual example f.Random.String2(1, 100)
the max can be static or random and faker.Generate(1000)
can be randomized. In the foreach, you can inspect the length of the builder and when a size is reached bail (which I didn't include) out and write to a file.
Faker<LineItem> faker = new Faker<LineItem>()
.RuleFor(item => item.Value, f => f.Random.String2(1, 100));
var result = faker.Generate(1000);
StringBuilder builder = new ();
foreach (var item in result)
{
builder.Append(item);
}
File.WriteAllText("Dump.txt", builder.ToString());