Voici comment calculer le temps d'execution d'une boucle mais ceci est adaptable a tout corps de programme bien sur.
//Récupération
starttick = System.Environment.TickCount;
for (i=0; i < 10; i++)
{
Mon code
}
endtick = System.Environment.TickCount;
//ecris dans le debug.
System.Diagnostics.Debug.WriteLine(endtick - starttick);