I have a List(Of DateTime) items. How can I check if all the items are the same with a LINQ query? At any given time there could be 1, 2, 20, 50 or 100 items in the list.
My variant:
var numUniques = 1; var result = list.Distinct().Count() == numUniques;