BelhardTraining.PointDemo.Program.PrintCoordinates C# (CSharp) Метод

PrintCoordinates() приватный статический Метод

Печатает пару координат x и y заданным цветом
После завершения метода цвет консоли будет таким же как до её вызова
private static PrintCoordinates ( int x, int y, ConsoleColor textColor ) : void
x int
y int
textColor ConsoleColor
Результат void
        private static void PrintCoordinates(int x, int y, ConsoleColor textColor)
        {
            ConsoleColor oldForegoundColor = Console.ForegroundColor;
            Console.ForegroundColor = textColor;
            Console.Write("({0},{1})", x, y);
            Console.ForegroundColor = oldForegoundColor;
        }