编译器错误 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
}