Csharp/C Sharp/Development Class/Stopwatch
Версия от 15:31, 26 мая 2010; (обсуждение)
Use Stopwatch
using System;
using System.Reflection;
using System.Diagnostics;
class OnlyLoad {
static void Main() {
Stopwatch duration = new Stopwatch();
duration.Reset();
duration.Start();
Assembly a = Assembly.Load("library");
duration.Stop();
Console.WriteLine(duration.ElapsedTicks.ToString());
duration.Reset();
duration.Start();
a = Assembly.ReflectionOnlyLoad("library");
duration.Stop();
Console.WriteLine(duration.ElapsedTicks.ToString());
}
}