I have made an array where the user inputs several names, I then want the program to print them out. If the letter ends with "a" I want it to change color. Here's what I mean in code.
Array.Sort(stodents);
Console.WriteLine("----------");
for (int i = 0; i < stodents.Length; i++)
{
if (What do I type here?)
{
Console.ForegroundColor = ConsoleColor.Magenta;
}
else
{
Console.ForegroundColor = ConsoleColor.Blue;
}
Console.WriteLine(stodents[i]);
}
So yeah I want it to make the string blue when it doesn't end with an A and magenta when it does.