So I am fairly new to the "code world" and hopefully have a fairly simply question.
txtBox.Text = "x";
string has a constructor that repeats a character for a given number of times:
txtBox.Text = new string('x', 10);
It's documented here.
If what you want to repeat is a string (not a single character) you need a loop, but use a
StringBuilder to minimise memory fragmentation. Try avoiding repetitive string concatenations:
var stringBuilder = new StringBuilder(); for(int i = 0; i < 10; i++) stringBuilder.Append("ThePatternToRepeat"); txtBox.Text = stringBuilder.ToString();