O
O
Oleg2021-11-29 11:14:30
ASP.NET
Oleg, 2021-11-29 11:14:30

How to get a list of unique values?

The object has a field: date. Date values ​​are repeated. How to list unique date values?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai Volkotyuk, 2021-11-29
@danila_net

There is a distinct() method for this:
q.ToList().Distinct()

R
Roman, 2021-11-30
@yarosroman

https://docs.microsoft.com/en-us/dotnet/api/system... implement IEquatable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question