I have a Collection, I'm trying to use the Distinct method to remove duplicates.
public static Collection<MediaInfo> imagePlaylist
imagePlaylist = imagePlaylist.Distinct(new API.MediaInfoComparer());
I get the error "Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'System.Collections.ObjectModel.Collection'. An explicit conversion exists (are you missing a cast?)"
imagePlaylist used to be a List (i could use .ToList()), but to comply with "CA1002 Do not expose generic lists" I want to convert the List to a Collection.
-Thanks
imagePlaylist
asIEnumerable<MediaInfo>
for a readonly sequence. – Ariose