Hy Guys!
I have a list of “ObjDay” which could have replicated items. How can I select them?
ObjDay is:
Public class ObjDay
_date
...
End Class
I tried to do:
replicatedItems = From d In ObjDaysList _
Order By d._date _
Group d By d._date Into newGroupOfObjDays = Group _
Where newGroupOfObjDays.Count > 1 _
Select newGroupOfObjDays
But I’m getting this error:
Can’t convert object of type ‘WhereSelectEnumerableIterator
2[VB$AnonymousType_02[System.DateTime,System.Collections.Generic.IEnumerable1[ObjDay]], System.Collections.Generic.IEnumerable1[ObjDay]]’
in type ‘System.Collections.Generic.List`1[ObjDay]’.
Tks for help!
You’re selecting groups, and trying to assign it to a
List(Of ObjDay). That won’t work. You could do: