How to ignore 'null' in order by clause

Viewed 1316

How i can ignore Null in name property when orderby

student.Students= student.student.OrderBy(s=> s.Name ?? null).ToList();

The above code always return list of students having Name = null as 1st element in the list and student with name 'system' in the end.

What i want to ignore/exclude null in orderby. the null should always come to end of the the list

1 Answers
Related