I'm trying to compile some code in MonoTouch but I'm getting an error: 'type or namespace name 'Func' could not be found'
According to MSDN the delegate 'Fu开发者_运维问答nc' is found in System and specifically the mscorlib assembly, I'm not sure if that is included in MonoTouch?
Not too sure what I should do at this point, I'm thinking maybe I should just replace Func with my own version of it (it doesn't seem to be too complicated as a delegate).
Any ideas?
Func is available in MonoTouch according to the documentation: http://go-mono.com/docs/monodoc.ashx?link=T%3aSystem.Func%601
You could easily replicate the declaration of the Func delegate. Perhaps you could post your usage of it so we can check that?
Func (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult) Delegate
is declared like this in mscorlib (found using reflector):
namespace System
{
public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
}
Declare the same delegate yourself and you'll be able to use it.
精彩评论