不好意思想問一下
C#裡我宣告一個public event EventHandler Stopped;
我今天這樣寫
if (Stopped != null) {
Stopped(this, EventArgs.Empty);
}
C#是可以過的
但我在C++/CLI裡
public:
event EventHandler^ Stopped;
if (Stopped != nullptr){
Stopped(this, EventArgs::Empty);
}
我if判斷式是不對的
Stopped(this, EventArgs::Empty);只跑這行可以過的
error C3918: 使用方式必須有 'AviPlayer::Stopped' 才能成為資料成員
AviPlayer是我的class名
能請教 一下為什麼嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.138.148.230