While testing linq queries I stumbled on an interesting error:
When using the group by clause using query syntax the return type is not “Ienumberable[IGrouping]”.
Its rather this:
'System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Int32]]'
The error is this:
Main.xaml: Cannot assign from type 'System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Int32]]' to type 'System.Collections.Generic.IEnumerable`1[System.Linq.IGrouping`2[System.Int32,System.Int32]]' in Assign activity 'Assign'.
However when using method query there is no error and the return type is correct:
'System.Collections.Generic.IEnumerable`1[System.Linq.IGrouping`2[System.Int32,System.Int32]]
8 posts - 4 participants