P
Paolo
I have the following:
void setColours()
{
Console.BackgroundColor = ConsoleColor .Black;
Console.ForegroundColor = ConsoleColor.Yellow;
}
thus setting the colours at compile time.
I would like to set the colours at run time and have something like:
void setColours( bgColour, fgColour)
{
Console.BackgroundColor = ConsoleColor .bgColour;
Console.ForegroundColor = ConsoleColor.fgColour;
}
however the compiler does not allow this.
Is it possible to set colours at run time and if so how would i do it?
Thanks
void setColours()
{
Console.BackgroundColor = ConsoleColor .Black;
Console.ForegroundColor = ConsoleColor.Yellow;
}
thus setting the colours at compile time.
I would like to set the colours at run time and have something like:
void setColours( bgColour, fgColour)
{
Console.BackgroundColor = ConsoleColor .bgColour;
Console.ForegroundColor = ConsoleColor.fgColour;
}
however the compiler does not allow this.
Is it possible to set colours at run time and if so how would i do it?
Thanks