On Jun 17, 10:48 am, Peted wrote:
Quote:
Im using vs2008 c# 3.0 and am going through some other person(s) code
to clean up compiler warnings that are bieng produced.
>
I have this code (at bottom)
>
where a delegate/event is defined
>
and it builds ok with no errors but im trying to get rid of the
compiler warnings. The warning in this case is
>
Warning 35 The event
'TestCLassA.MainContainer.BillEventRedrawComplete' is never used
That seems very odd. Could you produce a short but complete program
which shows it? Then we can report it to the compiler team.
Perhaps it's not "used" in terms of never being fired from within the
class - in which case I question its usefulness.
In terms of removing the warning, I'd use a pair of #pragma directives
around just that line of code - it makes it obvious what you're doing,
compared with using the event for no reason elsewhere.
As I say though, I can't see that it's currently doing anything useful
- just being able to subscribe to an event isn't really useful when it
never gets fired.
Jon