代码无法在紧凑框架中编译



以下代码未在Compact Framework 2(VS2008)上编译

public delegate TResult Func<out TResult>();
public delegate TResult Func<in T, out TResult>(T a);
public delegate TResult Func<in T1, in T2, out TResult>(T1 arg1, T2 arg2);
public delegate TResult Func<in T1, in T2, in T3, out TResult>(T1 arg1, T2 arg2, T3 arg3);
public delegate TResult Func<in T1, in T2, in T3, in T4, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4);

我不确定代码作者想做什么,我需要知道如何解决这个问题。

广告信息:此代码来自LinqBridge的源

感谢

代码只是定义了.NET 2.0、中尚未定义的各种Func委托

尝试去掉inout修饰符,因为它们在.NET 2.0中也不受支持:

public delegate TResult Func<TResult>();
public delegate TResult Func<T, TResult>(T a);
public delegate TResult Func<T1, T2, TResult>(T1 arg1, T2 arg2);
public delegate TResult Func<T1, T2, T3, TResult>(T1 arg1, T2 arg2, T3 arg3);
public delegate TResult Func<T1, T2, T3, T4, TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4);

相关内容

  • 没有找到相关文章

最新更新