Export (0) Print
Expand All
Expand Minimize

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
   }
};

Community Additions

ADD
Show:
© 2014 Microsoft