Posts

Showing posts with the label diagnose using c#

Optimize Process Speed using C#

To optimized code speed you can use System.Diagnostics  Namespace. ============================= using System; using System.Diagnostics; using System.Threading; namespace DiagnoseProcessSpeed {     internal class Program     {         static void Main()         {             Stopwatch sw = Stopwatch.StartNew(); // Start Stopwatch             for (int i = 1; i < 11; i++)             {                 System.Console.WriteLine("Loop : " + i);                 Thread.Sleep(1000);// interval for 1 seconds.             }             sw.Stop(); // End Stopwatch             //sw.Elapsed Contain Process Taking Time in Seconds             System....