Strange

Here is snippit of code:

What is strange is that ReSharper flags the e in the 2nd method as "declared but never used" but not the e in the 1st method.

Anyone got an idea of why?

Rob

4 comments
Comment actions Permalink

I've seen the same behaviour. In my case the warning was only on event
handlers not used, while on those properly referenced the warning does
not appears.
Ciao


Brian Trainer wrote:

Here is snippit of code:

 {
>     btnRemoveGuest.Enabled = true;
> }
> 
> private void btnClear_Click(object sender, EventArgs e)
> {
>     ResetForNewScan();
> }]]>

What is strange is that ReSharper flags the e in the 2nd method as "declared but never used" but not the e in the 1st method.

Anyone got an idea of why?

Rob



--


Giorgio Santini
Co-founder & VP Engineering
via Premuda, 3 - 00195 Roma (Italy)
tel.: +39 06 39030317
fax: +39 06 39030319
mobile: +39 335 5754899
mail: giorgio.santini@eris4.com <mailto:giorgio.santini@eris4.com>
web: http://www.eris4.com <http://www.eris4.com/>

0
Comment actions Permalink

I will go back and check, but I believe that both of these handlers are
referenced.

Rob

"Giorgio Santini" <giorgio.santini@eris4.com> wrote in message
news:c96tus$j4j$1@is.intellij.net...

I've seen the same behaviour. In my case the warning was only on event
handlers not used, while on those properly referenced the warning does
not appears.
Ciao

>
>

Brian Trainer wrote:

Here is snippit of code:

>

 > {
> >     btnRemoveGuest.Enabled = true;
> > }
> >
> > private void btnClear_Click(object sender, EventArgs e)
> > {
> >     ResetForNewScan();
> > }]]>

What is strange is that ReSharper flags the e in the 2nd method as

"declared but never used" but not the e in the 1st method.

>

Anyone got an idea of why?

>

Rob

>
>

--

>
>

Giorgio Santini
Co-founder & VP Engineering
via Premuda, 3 - 00195 Roma (Italy)
tel.: +39 06 39030317
fax: +39 06 39030319
mobile: +39 335 5754899
mail: giorgio.santini@eris4.com <mailto:giorgio.santini@eris4.com>
web: http://www.eris4.com <http://www.eris4.com/>



0
Comment actions Permalink

Giorgio,

I believe that in your case ReSharper works right. If a parameter
is not used in the body of an event handler, it does not yet mean that
the parameter is not needed - if the event handler is referenced, it's
signature
should match that of the event's type.

"Giorgio Santini" <giorgio.santini@eris4.com> wrote in message
news:c96tus$j4j$1@is.intellij.net...

I've seen the same behaviour. In my case the warning was only on event
handlers not used, while on those properly referenced the warning does
not appears.
Ciao

>
>

Brian Trainer wrote:

Here is snippit of code:

>

 > {
> >     btnRemoveGuest.Enabled = true;
> > }
> >
> > private void btnClear_Click(object sender, EventArgs e)
> > {
> >     ResetForNewScan();
> > }]]>

What is strange is that ReSharper flags the e in the 2nd method as

"declared but never used" but not the e in the 1st method.

>

Anyone got an idea of why?

>

Rob

>
>

--

>
>

Giorgio Santini
Co-founder & VP Engineering
via Premuda, 3 - 00195 Roma (Italy)
tel.: +39 06 39030317
fax: +39 06 39030319
mobile: +39 335 5754899
mail: giorgio.santini@eris4.com <mailto:giorgio.santini@eris4.com>
web: http://www.eris4.com <http://www.eris4.com/>



0
Comment actions Permalink

I know it works properly. I use this feature to look for unreferenced
Event Handlers ;)))

Giorgio

Dmitry Shaporenkov (JetBrains) wrote:

Giorgio,

I believe that in your case ReSharper works right. If a parameter
is not used in the body of an event handler, it does not yet mean that
the parameter is not needed - if the event handler is referenced, it's
signature
should match that of the event's type.

"Giorgio Santini" <giorgio.santini@eris4.com> wrote in message
news:c96tus$j4j$1@is.intellij.net...

>>I've seen the same behaviour. In my case the warning was only on event
>>handlers not used, while on those properly referenced the warning does
>>not appears.
>>Ciao
>>
>>
>>Brian Trainer wrote:
>>
>>>Here is snippit of code:
>>>
>>>

 
> EventArgs e)
> 
>>>{
>>>    btnRemoveGuest.Enabled = true;
>>>}
>>>
>>>private void btnClear_Click(object sender, EventArgs e)
>>>{
>>>    ResetForNewScan();
>>>}]]>

>>>What is strange is that ReSharper flags the e in the 2nd method as


"declared but never used" but not the e in the 1st method.

>>>Anyone got an idea of why?
>>>
>>>Rob
>>
>>
>>--
>>
>>
>>Giorgio Santini
>>Co-founder & VP Engineering
>>via Premuda, 3 - 00195 Roma (Italy)
>>tel.: +39 06 39030317
>>fax: +39 06 39030319
>>mobile: +39 335 5754899
>>mail: giorgio.santini@eris4.com <mailto:giorgio.santini@eris4.com>
>>web: http://www.eris4.com <http://www.eris4.com/>




--


Giorgio Santini
Co-founder & VP Engineering
via Premuda, 3 - 00195 Roma (Italy)
tel.: +39 06 39030317
fax: +39 06 39030319
mobile: +39 335 5754899
mail: giorgio.santini@eris4.com <mailto:giorgio.santini@eris4.com>
web: http://www.eris4.com <http://www.eris4.com/>

0

Please sign in to leave a comment.