使用 System.Diagnostics12345//Stopwatch stopWatch = Stopwatch.StartNew();/*要測試的區塊放這*/stopWatch.Stop();Trace.WriteLine("使用時間: "+ stopWatch.ElapsedMilliseconds);