Re: Event never used warning message

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 11/02/04


Date: Tue, 2 Nov 2004 14:30:08 -0500

Jack,

    I think the warning is because the event is never being fired anywhere
from within your class. The compiler is issuing the warning because it is
wondering why you have an event that you never fire.

    You can go to the project properties and set it so that the compiler
will not issue warnings below a certain level. You can also include
warnings you would like to ignore. However, as a matter of general
principal, I would say that this is a bad thing. I would recommend treating
warnings as errors, and strive for no compilation errors.

    Hope this helps.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Jack Addington" <jaddington@shaw.ca> wrote in message 
news:%23sacoMQwEHA.2728@TK2MSFTNGP12.phx.gbl...
>I have created an event and delegate combination for use in a user control 
>when I place it on a form.  However because I'm not actually doing anything 
>in the event in the user object I didn't create any code for it.
>
> 1) How do I get rid of that warning (besides creating an empty 
> declaration)
> 2) What is the best practice for declaring new events
>
> thx
>
> jack
> 


Relevant Pages

  • Re: Is it standard and practical to use long long types?
    ... > right option for putting the compiler in conforming mode. ... > compiler is invoked with the extensions disabled, ... Bogus/idiotic warnings when all warnings are enabled. ... GCC does not fully support C99, yet ansi invokes it's C99 spirit. ...
    (comp.lang.c)
  • Re: Is it standard and practical to use long long types?
    ... > right option for putting the compiler in conforming mode. ... > compiler is invoked with the extensions disabled, ... Bogus/idiotic warnings when all warnings are enabled. ... GCC does not fully support C99, yet ansi invokes it's C99 spirit. ...
    (comp.lang.cpp)
  • Re: Tcl 8.5 HP/UX Compiler warnings
    ... results and "the optional HP ANSI C compiler", ... stat64 struct pointers are being ... The elementary types of the structure ... other warnings I cited are similarly harmless. ...
    (comp.lang.tcl)
  • Re: Is it standard and practical to use long long types?
    ... right option for putting the compiler in conforming mode. ... Bogus/idiotic warnings when all warnings are enabled. ... For reference, this what I get from gcc, when invoked in conforming mode ...
    (comp.lang.cpp)
  • Re: Is it standard and practical to use long long types?
    ... right option for putting the compiler in conforming mode. ... Bogus/idiotic warnings when all warnings are enabled. ... For reference, this what I get from gcc, when invoked in conforming mode ...
    (comp.lang.c)