A Common Source of Bugs
When an operation has to be invoked on an instance of such a reference type, a dereferencing operation occurs. It’s invalid, though, to dereference the null reference, causing an exception to occur. Figure 4.37 shows such a
Null references that are unaccounted for are probably the number one source of bugs in managed code programming. Rigorous checking for null references is an important pattern everyone should master. Obviously, the question is where such checks need to be applied.
When designing a new library, it’s essential to specify the intended ...