Is it possible to check how long a particular segment of code takes to execute,
just want to see if some loops etc. can be optimized better or use LinQ.
Is there such function built into Visual Studio or must I do this with some
code, stopwatch class etc.?
Thanks.
If you have VS2010 Ultimate:
From the
Analyzemenu, select theLaunch Performance Wizardoption.Its been a while since I last used it, but I believe it tells you how long things take to execute and what’s using up the most memory, and so on =)
Otherwise, you’ll have to use the
Stopwatchclass or a third party profiler.