+ 4
What is the difference between "Class" and "Struct"?
Declarations are the same. Both have fields and methods. You can make instance of them in the same way. Calling the members also is the same.
5 Respuestas
+ 1
Quote:
Structs are value types and are copied on assignment. Structs are value types while classes are reference types
https://www.c-sharpcorner.com/blogs/difference-between-struct-and-class-in-c-sharp
+ 4
The basic difference is that in structures, all the members are public by default whereas in class all are private by default.
+ 1
sneeze Thanks 🙏🏻 The link you sent, made the point very clear to me. 👌🏻
0
Arsenic just that?? So what's the point?
Access modifiers easily can be changed manually. I don't think MS engineers define 2 different concepts just because of their access modifiers.
0
Arsenic thats... C++ or c#?