c# new string('c', 5) printing too many code example Example: c# repeat string x times string result = new String('-', 5); Output: -----