R# Not detecting un-used parameter

Hi!
If I have a method with a parameter I don't use, R# detects its and warns me, but if the paramter is "ref" it doesn't, Example:

private int SomeMethod(int usedParameter, int unUsedParameter1, ref int unUsedParameter2){
return usedParameter+1;
}

usedParameter: Fine, it is being used;
unUsedParameter1: "Looks gray" because it is not being used;
unUsedParameter2: It is not being used, but R# emits no warning.

Is is there a special reason that justifies that an unused "ref" parameter is ignored?

Thanks


0
1 comment

Hello,

Thank you for reporting the bug. It will be fixed in one of the next releases.

Thanks,
Andrey Simanovsky

Hi!
If I have a method with a parameter I don't use, R# detects its and
warns me, but if the paramter is "ref" it doesn't, Example:
private int SomeMethod(int usedParameter, int unUsedParameter1, ref
int unUsedParameter2){
return usedParameter+1;
}
usedParameter: Fine, it is being used;
unUsedParameter1: "Looks gray" because it is not being used;
unUsedParameter2: It is not being used, but R# emits no warning.
Is is there a special reason that justifies that an unused "ref"
parameter is ignored?

Thanks




0

Please sign in to leave a comment.