Search
 
SCRIPT & CODE EXAMPLE
 

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();
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity download image from online 
Csharp :: c# configurationmanager load from file 
Csharp :: c# excel fix first row 
Csharp :: erlang start net kernel 
Csharp :: Devexpress MVC Gridview BinaryImage Picture 
Csharp :: ########## 
Csharp :: reference variable from another script "winforms" c# 
Csharp :: ASP.NET Web Forms TextBox 
Csharp :: C# read GroupComponent using regex 
Csharp :: httprequestmessage with authorization .net 5 
Csharp :: How to get the value of an input button in an ASP.NET Core MVC controller 
Csharp :: c# object list contains object returns incorrect boolean 
Csharp :: button commandfield commandargument pass textbox 
Csharp :: initialize c# array property of class object site:stackoverflow.com 
Csharp :: Accepts one of 1, 2, x or X, or nothing 
Csharp :: permutation and combination program in c# 
Csharp :: c# how to debig 
Csharp :: c# string .contains against empty string returns 
Csharp :: C# Associativity of Operators 
Csharp :: mouse position to canvas transform 
Csharp :: how to input data several times in c# 
Csharp :: c# ulong 
Csharp :: asp.net razor get list without refresh 
Csharp :: what is C# 
Csharp :: Unity make a homing object 
Csharp :: how to make a methode accessible from all the forms c# 
Csharp :: eager loading singleton c# dependency injection 
Csharp :: hacking 
Csharp :: fixed angle unity 
Csharp :: ? in c# 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =