Search code examples
c#visual-studio-express

Thread.Sleep not working in Visual Studio 2012


I just found out about Thread.Sleep() and read a lot about it here: How to add a delay for a 2,3 seconds

The method doesn't get recognized when I try it in Microsoft Visual Studio Express 2012 to close a very simple C# battle simulator (I put it at the bottom outside a While loop).


Solution

  • Try

    System.Threading.Thread.Sleep( 2000 );