xyz*_*xyz 36 .net c# list .net-3.5
使用String类,您可以:
string text = new string('x', 5);
//text is "xxxxx"
Run Code Online (Sandbox Code Playgroud)
创建List <T>的最短方法是什么,该List <T> n包含所有相同引用的元素?
Jar*_*Par 107
请尝试以下方法
var l = Enumerable.Repeat('x',5).ToList();
Run Code Online (Sandbox Code Playgroud)