I want to make "a variable" that changes text color to green for whatever you print in its curly braces however when curly braces are closed it changes console text color back to gray for the next things I print.
So for short what I wanted to do is this:
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("test");
Console.ForegroundColor = ConsoleColor.gray;
but since I have this a lot in my code I want to short it like this:
mycmd(green, gray)
{
Console.WriteLine("test");
}