c# - List of distinct dates -


i have following code:

list<datetime> dates = new list<datetime>(); //filling list somehow dates = dates.distinct().tolist(); 

the code working list of unique datetime. , want list of unique dates since don't need times @ here. there nice solution?

my question differs

c# linq select distinct date time days

since not quering database actually. want filter list.

how using transform select?

projects each element of sequence new form.

something like

dates = dates.select(x => x.date).distinct().tolist(); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -