Following script to play a sound. Sound length 6 seconds which plays repeating for 6 seconds
Task.Factory.StartNew<int>(() =>
{
while (isSoundOn)
{
player.Play();
Thread.Sleep(6000);
}
return 1;
});
Everything is working fine for .Net Framework 4 but I have need to build for .Net Framework 3.
When I use .Net Framework 3 then it shows following error
The name 'Tasks' does not exists in current context
What will be the solution. Thanks in advance.