編譯器錯誤 C3919
'event_method': 函式必須具有類型 'type'
事件存取子方法未正確宣告。
如需事件的詳細資訊,請參閱 事件。
下列範例會產生 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
}
};