ReSharper 2018.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 code

After 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: 21 December 2018

See Also