using System.Diagnostics;
private const int counters = 999;
public static void Main()
Console.WriteLine("Start");
Stopwatch sw = new Stopwatch();
Console.WriteLine(sw.Elapsed);
Console.WriteLine("Start Again");
Stopwatch sw1 = new Stopwatch();
Console.WriteLine(sw1.Elapsed);
Console.WriteLine("See the difference");
private static void Algorithm()
for (int i = 0; i <= counters; i++)
private static void Algorithm1()
StringBuilder result = new StringBuilder();
for (int i = 0; i <= counters; i++)
result.Append(i.ToString());