Home > Software engineering >  ADDRESS LIST OF IGROUPING OBJECT
ADDRESS LIST OF IGROUPING OBJECT

Time:09-06

I have a list of object grouped by this:

Dim duplicates = test.GroupBy(Function(i) i.Total) _
                            .Where(Function(x) x.Count() > 1) _
                            .[Select](Function(x) x).ToList

Now I can see throug the debugger that It group correctly the duplicates objects of the list test by a key that is the total property.

Now for each key value I need to get the objects, and than do some stuf with them (for each cycle). My problem is that I can't access theme in anyway. If I try to cast I always get :Value of type List(Of IGrouping(Of Integer, myObject)) cannot be converted to List(Of myObject)) How can I access this data and manipulate it?

CodePudding user response:

The prospective was wrong. Switched to list of object and changed approach for sorting groupin without linq.

  • Related