how to extract unique years from a list of different years in csharp
Code Example - how to extract unique years from a list of different years in csharp
List<DateTime> result = source
.Select(d => new DateTime(d.Year, d.Month, 1))
.Distinct()
.ToList();