With the String class, you can do:
string text = new string('x', 5);
//text is "xxxxx"
What's the shortest way to create a List< T > that is full of n
elements which are all the same reference?
Try the following
var l = Enumerable.Repeat('x',5).ToList();