ReSharper 2026.1 Help

Code inspection: The CallerMemberNameAttribute will have no effect; it is overridden by the CallerLineNumberAttribute

This inspection reports a parameter marked with both [CallerMemberName] and [CallerLineNumber]. [CallerLineNumber] overrides [CallerMemberName] on the same parameter, so the member name attribute has no effect and only makes the code misleading.

Example

using System.Runtime.CompilerServices; void Log([CallerMemberName, CallerLineNumber] object info = null) { }
using System.Runtime.CompilerServices; void Log([CallerLineNumber] object info = null) { }

How to fix

There is no dedicated quick-fix. The usual fix is to remove the overridden attribute.

21 April 2026