2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by danielernesto
0

A struct defines a value type; a class defines a reference type.

A value type is one whose values cannot be separated from the variable. If you try copying it to a different variable, you'll make a complete copy. You don't really modify value types -- you modify the variables that contain them.

Compare this with class types, where variables contain references that point to objects -- where two variables of that type may contain references that point to the same object.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.