ReSharper 2026.1 Help

Code inspection: Suspicious parameter name in ArgumentNullException

This inspection reports ArgumentNullException created with a parameter name that does not match the value being checked for null. That usually means the wrong argument name was passed by mistake. If the exception is thrown, it will point at the wrong parameter and make debugging harder.

Example

void Save(string value, string name) { if (value == null) throw new ArgumentNullException(nameof(name)); }
void Save(string value, string name) { if (value == null) throw new ArgumentNullException(nameof(value)); }

Quick-fix

Correct the parameter name passed to the ArgumentNullException constructor.

01 April 2026