The type or namespace name 'c' could not be found (are you missing a using directive or an assembly reference?)
当我尝试从下面运行代码时,我从上面得到错误。
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));