Зміст курсу
C# Beyond Basics
C# Beyond Basics
Practicing Constructors
The following program has two structs, one of them is called Point
which defines some coordinate as it has an x
and a y
attribute / field. The other struct is called Triangle
and it is made up of 3 point objects. In the constructor we pass three point objects to correctly initialize a triangle.
Fill in the blanks to complete the constructors of both the structs.
It will also be a good code reading exercise to read the whole code and try to understand it, however it is not necessary to solve this task.
index.cs
Все було зрозуміло?
Зміст курсу
C# Beyond Basics
C# Beyond Basics
Practicing Constructors
The following program has two structs, one of them is called Point
which defines some coordinate as it has an x
and a y
attribute / field. The other struct is called Triangle
and it is made up of 3 point objects. In the constructor we pass three point objects to correctly initialize a triangle.
Fill in the blanks to complete the constructors of both the structs.
It will also be a good code reading exercise to read the whole code and try to understand it, however it is not necessary to solve this task.
index.cs
Все було зрозуміло?