ReSharper highlights use of nameof with “Explicit argument passed to parameter with caller info attribute”

was just wondering if the above warning is something I should worry about.

When you have CallerMemberName attribute attached, you don’t have to explicitly pass a value, because the attribute will do exactly that for you. It will find the caller’s name and use it, making your nameof declaration redundant. This is of course assuming you call RaisePropertyChanged from the actual property implementation.

ReSharper marks these calls as redundant when you explicitly pass a string literal. It should force the same logic with nameof as well.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)