how to copy string exect numer of times c# code example Example: c# repeat string x times string result = new String('-', 5); Output: -----