Compiler Error C3919

'event_method': function must have type 'type'

An event accessor method was not declared correctly.

For more information about events, see event.

The following sample generates C3919:

// C3919.cpp
// compile with: /clr /c
using namespace System;
delegate void D(String^);
ref class R {
   event D^ e {
      int add(int);   // C3919
      int remove(int);   // C3919

      void add(D^);   // OK
      void remove(D^);   // OK
   }
};