Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to extract unique years from a list of different years in c#

List<DateTime> result = source
  .Select(d => new DateTime(d.Year, d.Month, 1))
  .Distinct()
  .ToList();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #extract #unique #years #list #years
ADD COMMENT
Topic
Name
1+8 =