Do not throw NotImplementedException

TypeName DoNotThrowNotImplementedException
CheckId BC1002
Category Usage
Breaking Breaking, NonBreaking


Code has been found to throw a NotImplementedException.

Rule description

Production code should not throw NotImplementedException, which is intended to signal that the code for a method body has not yet been fully implemented.

How to fix violations

Replace the exception by the "real" method body. If the method should do nothing but throw an exception to indicate that it is not usable, throw NotSupportedException instead of NotImplementedException.

When to exclude warnings

Violations of this rule should only be excluded early in the development cycle. However, rather than create temporary exclusions, it is recommended that this rule be left disabled until a point is reached in the development cycle where it becomes unacceptable to commit code that contains "fix me" placeholders.

Last edited Apr 2, 2012 at 2:02 PM by calinoiu, version 2


No comments yet.