-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage of _ in methods arguments raises SA1313 #2599
Comments
I agree. As is, an exception is made for lambda expressions... In fact, I would request that any number of ignored parameters be supported in this way. This supports the cases where multiple parameters are to be ignored. e.g. |
Closing this one as won't fix. The recommended solution for method signatures when a parameter is intentionally not used is:
For example: public void Method(T value)
{
_ = value;
} |
Why close this as won't fix if so many people want it fixed? |
@tutike2000 There is no requirement that a project enable SA1313 or use it without modification. Options for resolving this externally include:
|
Currently
However, if we follow that advice, given by the IDE, then we run into this issue. That doesn't seem like a good thing to Won't Fix |
This should be fixed |
Usage of _ in method arguments raises SA1313.
Example:
Can you please make an exception to SA1313, to support '_' in method arguments?
The text was updated successfully, but these errors were encountered: