NotImplementedException

As the name pretty much implies, this exception results whenever a method or member is not implemented. This can indicate you’re dealing with a stub for functionality that’s not yet implemented. Visual Studio’s code editor Implement Interface feature uses this exception type for the method stubs it generates, as shown in Figure 23.21.

Image

FIGURE 23.21 Code generated by Visual Studio’s Implement Interface feature.

From a code-generation point of view, this is very beneficial because throwing an exception makes the compiler’s flow analysis happy as well: If a method has to return an object, throwing an exception instead is the ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.