title: Is there an easy way to return a string repeated X number of times?
body: <p>I'm trying to insert a certain number of indentations before a string based on an items depth and I'm wondering if there is a way to return a string repeated X times.  Example:</p>
  
  <pre><code>string indent = "---";
  Console.WriteLine(indent.Repeat(0)); //would print nothing.
  Console.WriteLine(indent.Repeat(1)); //would print "---".
  Console.WriteLine(indent.Repeat(2)); //would print "------".
  Console.WriteLine(indent.Repeat(3)); //would print "---------".
  </code></pre>