Question: I am always confused with the different ways of expressing nulls. There is the null reference type (aka "null"). Then I've seen that throughout my application, developers have used MinValue to represent nulls. Ex: Double.MinValue or DateTime.MinValue except for a String for which they use "null"

Then there is System.DBNull (and System.DBNull.Value - not sure what to use when). To add to the confusion, there are also `System.Nullable` and `System.Nullable<T>` namespaces.

Can someone help me clear this null confusion?

Thanks

Answer: 
Sure.

`System.DBNull` is a class that was (and still is) used by ADO.NET to represent a `null` value in a database. 

`null` is actually a `null` reference, and in your application code any reference type should use `null` as its, well, `null` value.

The usage of `MinValue` for various primitive types (which, since they are value types cannot be assigned `null`) dates back to the dark days before C# 2.0, which introduced generics. Now the preferred method for representing a nullable primitive type is to use the `Nullable<T>` generic type, usually represented in shorthand with a question mark after the primitive type. For example, I could declare a nullable `int` variable named `foo` in C# as:

```
Nullable<int> foo;

```

or

```
int? foo;

```

Both are identical.
The important difference here is that between value types and reference types. 
Value types represent directly a certain value, whereas reference types point to a memory location that should represent a value. When a a reference type actually does not point to a memory location with valid contents, the reference is Null.

Since value types are direct representations of value, they cannot be null. However, it might be the case that a actual value of a value type is unknown. For this case, .Net provides the Nullable types construct. When such a construct is not available, however, people tend to use special or default values, such as MinValue.

When communicating with databases, a lot of things we expect to be value types can actually be Null, since that it the way the database handles unknown values. This can also be solved by the Nullable types, but these were not always available. That's why DBNull exist, to deal with a possible null in a database.