[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

I need to use linq's OrderBy function to sort of two columns

Posted on 2012-08-10
2
Medium Priority
?
530 Views
Last Modified: 2012-08-10
How do I use the OrderBy call sort on two columns in a list, and give one column priority over the other?

Thanks.
0
Comment
Question by:newbieweb
2 Comments
 
LVL 22

Accepted Solution

by:
p_davis earned 2000 total points
ID: 38281273
do your

yourList.OrderBy(x=>x.Property).ThenBy(y=>y.yourOtherProperty)
0
 

Author Closing Comment

by:newbieweb
ID: 38281311
Thanks!
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question