repeat n times c# code example
Example 1: repeat 10 timesw c#
for (int i = 0; i < 10; i++)
{
}
Example 2: c# repeat string x times
string result = new String('-', 5);
Output: -----
for (int i = 0; i < 10; i++)
{
}
string result = new String('-', 5);
Output: -----