I often come across code like the following:
if ( items != null) { foreach(T item in items) { //... } }
Basically, the
the second will throw a NullReferenceException with the message Object reference not set to an instance of an object.
NullReferenceException
Object reference not set to an instance of an object.