c# repeat string x times

C#
string result = new String('-', 5);
Output: -----
Source

Also in C#: