How to easily time a block of C# code?
<p>I need a simple way (and compact if possible) to execute a block of C# while counting time. Something similar to this C++ code:</p>

<pre><code>elapsed = time_call([&amp;] 
   {
      for_each (a.begin(), a.end(), [&amp;](int n) {
         results1.push_back(make_tuple(n, fibonacci(n)));
      });
   });   
</code></pre>

<p>where time_call is:</p>

<pre><code>// Calls the provided work function and returns the number of milliseconds 
// that it takes to call that function.
template &lt;class Function&gt;
__int64 time_call(Function&amp;&amp; f)
{
   __int64 begin = GetTickCount();
   f();
   return GetTickCount() - begin;
}
</code></pre>

<p>I know the stopwatch way... anything more compact ?</p>
