TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C# Coding Standard

Rule:  8@107Checked automatically with code checker

Synopsis:Use standard exceptions
Severity Level:3


The following list of exceptions are too generic and should not be raised directly by your code:

  • System.Exception
  • System.ApplicationException
  • Any exception which is reserved for use by the CLR only (check MSDN for this) The .NET framework already provides a set of common exceptions. The table below summarizes the most common exceptions that are available for applications.

InvalidOperationExceptionAn action is performed which is not valid considering the object's current state.
NotSupportedExceptionAn action is performed which is may be valid in the future, but is not supported.
ArgumentExceptionAn incorrect argument is supplied.
ArgumentNullExceptionA null reference is supplied as a method's parameter that does not allow null.
ArgumentOutOfRangeExceptionAn argument is not within the required range.