Stopwatch sw = new Stopwatch();
int[] nums = new int[10000];
sw.Start();
for (int i = 0; i < nums.Length; i++)
{
Console.WriteLine(nums[i]);
}
sw.Stop();
Console.WriteLine(sw.Elapsed);
Console.ReadKey();
时间: 2024-11-22 18:05:42