April 2013
Intermediate to advanced
1700 pages
92h 51m
English
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 NullReferenceException.
FIGURE 4.37 A bad encounter with a null reference.
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 ...
Read now
Unlock full access