Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

Difference between Data Type and Reference Type?

Are Data Types created on the Stack, while Reference Types are created on the Heap?


I know that structs are DataTypes, as are int, Boolean, Char, and Date.


Is String a Reference Type?


Is this the reason we are to use StringBuilder when a program does even a little bit of String manipulation?


What else can you tell me about the Difference between Data Types and Reference Types?



Thanks

ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

Thanks. Was I right about the Stack and the Heap?

What if an object contains integers and booleans variables? I assume the entire object goes on the Heap...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, I meant Value Types.

What did you mean, by, "And, of course, having the overwritable equals operator for custom comparisons""
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial