【发布时间】:2015-10-28 03:33:06
【问题描述】:
我有一系列笔记。根据请求这些注释的 UI,我想排除一些类别。这只是一个例子。如果项目 Notes 弹出窗口请求注释,我应该排除 collection 注释。
Func<Note, bool> excludeCollectionCategory = (ui == UIRequestor.ProjectNotes)
? x => x.NoteCategory != "Collections"
: x => true; //-- error: cannot convert lambda to lambda
我收到以下错误:Type of conditional expression cannot be determined because there is no implicit conversion between 'lambda expression' and 'lambda expression'
感谢您的帮助
【问题讨论】: