title: Find Execution time of a Method
body: <p>I am making an Image Steganography project for my college. I have finished the project and have kept several different algorithms for hiding data in images.</p>
  
  <p>What I want to ask is that is there any way in C# through which I can find the execution/running time between two points in a program.
  For example</p>
  
  <pre><code>//Some Code
  //Code to start recording the time.
  hideDataUsingAlgorithm();
  //Code to stop recording and get the time of execution of the above function. 
  </code></pre>
  
  <p>I want to do this to show the difference between simple(less time consuming) and more efficient but time consuming algorithms (using same data and same image). I have around 10 different algorithms for Color and GrayScale Images.</p>
  
  <p>There is no multithreading so that wont be a problem. Theres simply just one main Thread.</p>