Structs | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Structs

When should i use structs why not always use class?

4th Feb 2019, 1:27 PM
Manhal EB šŸ”°
Manhal EB šŸ”° - avatar
2 Respostas
+ 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