I will start by giving a short and simple explanation of the
differences between these two. Data types in C# will either be value types or
reference types. You can think of Value types as actually being the
"value." All we are storing is that value. Think of Reference types
as being a "reference" to the value. In this case we are storing a
reference to the value you are using.
Value Type Examples
·
int
·
float
·
bool
·
byte
Reference Type Examples
·
string
·
object
·
List
·
Regex
Notice that the simpler, baser types tend to be values and
the more advanced types tend to be references. If it really seems like what is
being stored is just one single value, it is likely what you are dealing with
is a value type. If the data seems more complex or there are simply more bits
and pieces of information which are stored together, it is likely you are
dealing with a reference type.
Value types are often able to be set to
literal values. (42, 3.14159, true, false)
Reference types are similar to pointers in C and C++. (They
are not the same, but they are close.) I say this because it helps people
understand reference types to think of them as being like pointers to the data.
Some C++ purists will probably criticize me for explaining it this way.
Figure 1: Basic Concept

In Figure 1, I have defined two variables: foo and bar. Notice
that the value of foo is stored at the location of foo, but with bar there is
only a reference to the letters.