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
}
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for