110,500
社区成员
发帖
与我相关
我的任务
分享
class 叠加类
{
public string Source { get; set; }
public int Times { get; set; }
public override string ToString() { ... }
public TextReader GetReader() { ... }
}
class Program
{
static void Main(string[] args)
{
String str = "a";
DateTime t1 = DateTime.Now;
for (int i = 0; i < 20; i++)
str += str;
DateTime t2 = DateTime.Now;
Console.WriteLine("重复次数:" + str.Length);
Console.WriteLine("毫秒数:" + (t2 - t1).Milliseconds);
}
}