I\'m trying to write something to stop running the code after 15 seconds of running.
I don\'t want While loop or any kind of loop to be used and would l
While
Better you can use below code, which would help to improve in performance.
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(2));