C# Class BelhardTraining.PointDemo.Point2D

Datei anzeigen Open project: bazile/Training Class Usage Examples

Public Properties

Property Type Description
Color ConsoleColor
X int

Public Methods

Method Description
CalculateDistance ( Point2D other ) : double
Point2D ( int x, int y ) : System
Point2D ( int x, int y, ConsoleColor color ) : System
PrintDistance ( Point2D other ) : void

Protected Methods

Method Description
Square ( double num ) : double

Private Methods

Method Description
PrintCoordinates ( Point2D point ) : void

Печатает пару координат x и y заданным цветом

После завершения метода цвет консоли будет таким же как до её вызова

Method Details

CalculateDistance() public method

public CalculateDistance ( Point2D other ) : double
other Point2D
return double

Point2D() public method

public Point2D ( int x, int y ) : System
x int
y int
return System

Point2D() public method

public Point2D ( int x, int y, ConsoleColor color ) : System
x int
y int
color ConsoleColor
return System

PrintDistance() public method

public PrintDistance ( Point2D other ) : void
other Point2D
return void

Square() protected static method

protected static Square ( double num ) : double
num double
return double

Property Details

Color public_oe property

public ConsoleColor Color
return ConsoleColor

X public_oe property

public int X
return int