switch (Pattern[i])
{
case "Blue":
blueButton.BackColor = Color.LightBlue;
Thread.Sleep(1000);
blueButton.BackColor = Color.Red;
break;
case "Lime":
limeButton.BackColor = Color.Aquamarine;
Thread.Sleep(1000);
limeButton.BackColor = Color.Red;
break;
case "Yellow":
yellowButton.BackColor = ColorTranslator.FromHtml("#FFFF80");
Task.Delay(1000).Wait();
yellowButton.BackColor = Color.Red;
break;
case "Red":
redButton.BackColor = Color.Pink;
Task.Delay(1000);
redButton.BackColor = Color.Red;
break;
}
But there's simply no delay... it just jumps through. I tried using both Task.Delay and Thread.Sleep but non of them actually delay. Also I'm a new programmer so take it easy on me.