Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Practicing Constructors | Structs & Enumerators
course content

Зміст курсу

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.

cs

index.cs

Все було зрозуміло?

Секція 2. Розділ 9
course content

Зміст курсу

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.

cs

index.cs

Все було зрозуміло?

Секція 2. Розділ 9
some-alt