ReSharper 2017.2 Help

Code Inspection: Unused parameter in partial method

This inspection detects unused parameters in the implementation parts of a partial method.

Unused method parameters might indicate incomplete or dead code. Follow ReSharper’s suggestion to remove an unused parameter and update usages.

Suboptimal codeAfter the quick-fix
partial class Item { partial void ToCart(int id, int quantity); partial void ToCart(int id, int quantity) { Console.WriteLine($"{id} added to cart"); } }
partial class Item { partial void ToCart(int id); partial void ToCart(int id) { Console.WriteLine($"{id} added to cart"); } }
Last modified: 11 December 2017

See Also