Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Warning (level 3) CS0067 

Error Message

The event 'event' is never used

An event was declared but never used in the class in which it was declared.

The following sample generates CS0067:

// CS0067.cs
// compile with: /W:3
using System;
delegate void MyDelegate();

class MyClass
{
   public event MyDelegate evt;   // CS0067
   // uncomment TestMethod to resolve this CS0067
/*
   private void TestMethod()
   {
      if (evt != null)
         evt();
   }
*/
   public static void Main()
   {
   }
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.