I have some code that creates a list of lists. The list is of this type:
List<List<Device>> GroupedDeviceList = new List<List<Device>>();
But need to return the result in the following type:
IEnumerable<IGrouping<object, Device>>
Is this possible via a cast etc or should I be using a different definition for my list of lists?
If I understood your intentions correctly, the answer is below:
result is of type
IEnumerable<IGrouping<object, Device>>, where object is a reference to yourList<Device>.