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.
Reputation Points: 1135
Solved Threads: 171
Super Senior Demiposter
Offline 2,478 posts
since Jun 2005