C#

C#

Made by DeepSource

Reserved Exception being thrown CS-R1082

Anti-pattern
Major

Certain Exceptions are meant to be raised only by the Common Language Runtime (CLR) and should not be raised from within your code. It is recommended that you use more appropriate and suitable Exceptions instead.

Bad Practice

throw new IndexOutOfRangeException();

Recommended

throw new ArgumentOutOfRangeException();

Reference