Suppose I have a string, for example,
string snip = "</li></ul>";
I want to basically write it multiple times, depending on some integer value.
string snip = "</li></ul>";
int multiplier = 2;
// TODO: magic code to do this
// snip * multiplier = "</li></ul></li></ul>";
EDIT: I know I can easily write my own function to implement this, I was just wondering if there was some weird string operator that I didn't know about
In .NET 4 you can do this:
String.Concat(Enumerable.Repeat("Hello", 4))