它看起来好像不支持C++/CLI中System命名空间中的Action和Func委托。至少对于多个通用参数,如:C++/CLI使用行动<...,...>和Func <...>不受支持?
System::Action<int, int>^ action = nullptr;
System::Func<int, int>^ func = nullptr;
两种结果中的错误,如:
error C2977: 'System::Action' : too many generic arguments
error C2955: 'System::Action' : use of class generic requires generic argument list
只有一个参数动作作品:
System::Action<int>^ action = nullptr;
任何人,知道为什么还是什么缺少使这项工作。我正在使用Visual Studio 2008,该项目有目标框架3.5。
您是否有对System.Core的引用? – 2010-02-03 17:25:52