Sorry, I'm a newbe here so ... I got to ask, what's the diference between those 2 things??

Can anybody help me!!.

Recommended Answers

All 2 Replies

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.

Thanks that was very usefull,
I'll keep it in mind for a few projects =D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.