BelhardTraining.PointDemo.Point2D.PrintCoordinates C# (CSharp) Method

PrintCoordinates() private static method

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