Structs | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Structs

When should i use structs why not always use class?

4th Feb 2019, 1:27 PM
Manhal EB 🔰
Manhal EB 🔰 - avatar
2 ответов
+ 3
In C# you should use classes when dealing with complex structures and data, while structs should be used for more simple structures. This is my personal preference, but other than that the two should be relatively the same
4th Feb 2019, 2:02 PM
Sirius
Sirius - avatar
+ 1
Sirius thanks bro..
4th Feb 2019, 3:02 PM
Manhal EB 🔰
Manhal EB 🔰 - avatar