Use of ArgumentNullException when accessing arguments’ properties

Ideally, the Foo class would ensure that its Bar property is never null. If that’s not possible, I would throw an ArgumentException in this case since the argument is not null, but it is invalid.

Leave a Comment