if (condition = "true") { string color = "blue"; } else { string color = "red"; } Console.WriteLine(String.Format("The ball is {0}", color)); // At which point it says "color" doesn't exist in this context