ReSharper
 
Get ReSharper
You are viewing the documentation for an earlier version of ReSharper.

Code Inspection: Parameter name differs in partial method declaration

Last modified: 21 July 2022

When processing partial methods, C# compiler only checks the order and the types of the parameters, not their names. Although the compiler allows you to use different names for the same parameters in the defining and in the implementing declarations, the example below demonstrates why this could be a bad practice.

ReSharper detects mismatching parameter names and suggests that you use the same names for the same parameters. As it is impossible to infer which parameter name is meant to be correct, ReSharper does not offer any quick-fixes for this warning.