C# 클래스 BelhardTraining.PointDemo.Point2D

파일 보기 프로젝트 열기: bazile/Training 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Color ConsoleColor
X int

공개 메소드들

메소드 설명
CalculateDistance ( Point2D other ) : double
Point2D ( int x, int y ) : System
Point2D ( int x, int y, ConsoleColor color ) : System
PrintDistance ( Point2D other ) : void

보호된 메소드들

메소드 설명
Square ( double num ) : double

비공개 메소드들

메소드 설명
PrintCoordinates ( Point2D point ) : void

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

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

메소드 상세

CalculateDistance() 공개 메소드

public CalculateDistance ( Point2D other ) : double
other Point2D
리턴 double

Point2D() 공개 메소드

public Point2D ( int x, int y ) : System
x int
y int
리턴 System

Point2D() 공개 메소드

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

PrintDistance() 공개 메소드

public PrintDistance ( Point2D other ) : void
other Point2D
리턴 void

Square() 보호된 정적인 메소드

protected static Square ( double num ) : double
num double
리턴 double

프로퍼티 상세

Color 공개적으로 프로퍼티

public ConsoleColor Color
리턴 ConsoleColor

X 공개적으로 프로퍼티

public int X
리턴 int