The parameter lists for function and the delegate do not match. Ex:
// compile with: /clr
delegate int D( int, int );
ref class C {
public:
int mf( int ) {
return 1;
}
};
int main() {
C^ pC = gcnew C;
System::Delegate^ pD = gcnew D( pC, &C::mf ); // C3352
}
Possible resolution:
// compile with: /clr
delegate int D( int, int );
ref class C {
public:
int mf( int ) {
return 1;
}
int mf(int, int) { return 1; }
};
int main() {
C^ pC = gcnew C;
System::Delegate^ pD = gcnew D( pC, &C::mf );
}
This article is a derivative work based on Compiler Error C3352 which is provided by MSDN Community Content - Visual C++.