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 2,466 other followers

Archive for May 19th, 2011

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

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, Development, Software Development | Leave a Comment »

 
%d bloggers like this: