distinct and not null csharp

Code Example - distinct and not null csharp

                
                        dates
    .Where(x => x.HasValue)
    .Select(x => x.Value.Date)
    .Distinct()
    .OrderByDescending(x => x)