I'm wondering if there is a way to change the color of the text so that it looks like this when output
Name: Joe Blow
City: Denver
Score: 80
But I would like the text to be Yellow and the numbers to be White.
Console.WriteLine("Name: {0}", studentName);
Console.WriteLine("City: {0}", studentCity);
Console.WriteLine("Score: {0}",finalScore);
I know I could do it like the below code but I was hoping there might be a quicker way.
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("Name: ");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine(studentName);
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("City: ");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine(studentCity);
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("Score: ");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine(finalScore);
Thank you for any assistance!