2
The type or namespace name 'c' could not be found (are you missing a using directive or an assembly reference?)
当我尝试从下面运行代码时,我从上面找到了错误。带内部Lambda表达式的Lambda表达式
this.Calendar.Entries.Any<CalendarEntry>(c => c.Date.Date == date.Date && Filters.Any<Type>(f => typeof(c).IsInstanceOfType(f)));
有谁知道为什么这不起作用?如果我可以得到它的工作?
谢谢。
编辑:
不过现在知道为什么,因为我最初写的这是行不通的,但是当我把它写这样它的工作原理:
Filters.Any<Type>(f => this.Calendar.Entries.Where<CalendarEntry>(c => c.Date.Date == date.Date).SingleOrDefault().GetType().IsInstanceOfType(f));
谢谢。有用!!!我很傻,忘记了如何使用typeof :) –