The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Better solution for C# Warning CS0067 than “#pragma warning disable 0067”: The event ‘event’ is never used – Trevor’s Dev Blog – Site Home – MSDN Blogs

Posted by jpluimers on 2011/05/19

When you get a C# Warning CS0067, the MSDN documentation tell you to insert a “#pragma warning disable 0067”, but Trevor Robinson has a better solution at C# Warning CS0067: The event ‘event’ is never used – Trevor’s Dev Blog – Site Home – MSDN Blogs:

Since the event is never used, make the event explicit, or even throw an exception in the add clause of the event.

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.