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;
        }