Error del compilador C3911

Actualización: noviembre 2007

Mensaje de error

'método del descriptor de acceso del evento': la función debe tener el tipo 'firma'
'event_accessor_method': function must have type 'signature'

No se declaró correctamente el método del descriptor de acceso de un evento.

Para obtener más información, vea evento.

El ejemplo siguiente genera el error C3911:

// C3911.cpp
// compile with: /clr
using namespace System;
delegate void H(String^, int);

ref class X {
   event H^ E1 {
      void add() {}   // C3911
      // try the following line instead
      // void add(H ^ h) {}

      void remove(){}
      // try the following line instead
      // void remove(H ^ h) {}

      void raise(){}
      // try the following line instead
      // void raise(String ^ s, int i) {}
   };
};