Foxhole Atheist
Wednesday, February 13, 2013
Ordering objects with LINQ by multiple properties
I did it thusly
blah.OrderBy(x => x.firstprop).ThenBy(x => x.secondprop).Select(x=>
string
.Format(
"{0}:{1}"
, x.
firstprop
,x.
secondprop
)).ToList() ;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment