I need to delay the execution of a method for few seconds using Thread.
But when I use Thread.Sleep(1000);
it blocks the UI execution.
Somebody suggest me to use Task.Delay(1000).Wait();
. But it doesn't work in the framework 4.0.
I can do this using Timer. But I need to achieve this using Thread.
As I was a fresher I can't able to understand the answers provided in the similar questions.
Can any one tell me how to achieve the delayed execution of a method without blocking the UI.
Thanks in advance.