-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.5
-
Component/s: None
-
Labels:
Methods that check arguments should do so before checking internal state, so that internal state doesn't mask invalid arguments.
For example, classes that implement the freezable pattern should check for null arguments in property setters before checking whether the instance is frozen, so that attempting to set a property to null when the object is frozen should throw an ArgumentNullException instead of an InvalidOperationException.