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


i sorting ienumerable of objects:

var sortedobjects = objects.orderby(obj => obj.member) 

where member of icomparable type. sort seems put objects obj.member == null @ top. behaviour want, can consider stable respect future .net frameworks? there way can make 'nulls low' behaviour more explicit?

to make behavior more explicit:

var sorted = objects.orderby(o => o.member == null).thenby(o => o.member); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -