Value Type and Reference Type Analogy [Beginning]
I'm going to start a series of posts tagged [Beginning], to try and help new programmers, or anyone with an interest in programming understand concepts using real-world examples.
The first in this series, value types and reference types.
So, what is a value type?
msdn says:
Variables that are based on value types directly contain values.
more value types at msdn
And, what is a reference type?
msdn says:
Variables of reference types, referred to as objects, store references to the actual data.
more reference types at msdn
that's like defining the word the word, right? It seems like that's what everyone says for both... I think we can do better.
In simplest real-world forms:
value types are like money, cash, dinero, coin, dough...
you got the cash in your hand, now go buy an LCD TV!
reference types are like personal checks...
you got something in your hand, but you have to walk to the bank and turn that piece of paper into real money. (Now you can get your LCD TV)

















Thanks!
- reply
Submitted by brian on Tue, 05/25/2010 - 11:42pm.Nice Example
- reply
Submitted by lokeshkumar (not verified) on Fri, 05/21/2010 - 5:47am.