warning: Creating default object from empty value in /home1/seocactu/public_html/csharptocsharp/modules/taxonomy/taxonomy.module on line 1388.

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)

About Brian

profile for bluevoodoo1 on Stack Exchange, a network of free, community-driven Q&A sites

Brian Canzanella brings you nifty tips and tricks for most things .NET. read more...

Readers / Stuff