編譯器錯誤 C3352
'function' :指定的函式不符合委派類型 'type'
和委派的參數清單 function
不相符。
如需詳細資訊,請參閱委派(C++元件延伸模組)。
下列範例會產生 C3352:
// C3352.cpp
// compile with: /clr
delegate int D( int, int );
ref class C {
public:
int mf( int ) {
return 1;
}
// Uncomment the following line to resolve.
// int mf(int, int) { return 1; }
};
int main() {
C^ pC = gcnew C;
System::Delegate^ pD = gcnew D( pC, &C::mf ); // C3352
}