Enumerable OrderBy - are null values always treated high or low and can this be considered stable behaviour?

Viewed 10997

I am sorting some IEnumerable of objects:

var sortedObjects = objects.OrderBy(obj => obj.Member)

Where Member is of an IComparable type. This sort seems to put objects with obj.Member == null at the top. This is roughly the behaviour that I want, but can I consider this to be stable with respect to future .NET frameworks? Is there a way I can make this 'nulls are low' behaviour more explicit?

3 Answers
Related