Why does the IEnumerable.Select() works in 1 of 2 cases ? Can not be inferred from usage

后端 未结 5 816
无人及你
无人及你 2021-01-18 03:26

I get this error message:

The type arguments for method \'System.Linq.Enumerable.Select(System.Collections.Generic.IE         


        
5条回答
  •  时光取名叫无心
    2021-01-18 03:54

    I suspect that Add returns void - is that right? If so there is no way of projecting that to a Func<,> - only to an Action - and Select wants the Func<,>.

    Select is not the same as an indirect `foreach

提交回复
热议问题