What, exactly, does "Avoid unused parameters" do?

Leroy Casterline 1 Reputation point
2021-12-05T07:03:29.247+00:00

Using VS 2022 17.1.0 Preview 1.1,
In Options/Text Editor/C#/General:

I'm confused by the examples displayed for the 'Avoid unused parameters' options:

154980-image.png

Am I supposed to prefer functions that take no parameters over those that take more than one? Surely that isn't it, but I can't find clarification...

Developer technologies Visual Studio Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 122.6K Reputation points
    2021-12-05T09:09:53.127+00:00

    In my opinion, it means that you should not send the parameters, which are not required (not used) by the function.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.