Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7667201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:02:25+00:00 2026-05-31T15:02:25+00:00

I have following var result = new List<Tuple<int, List<ProductionReportEntry>, int>>(); How I can sort

  • 0

I have following var result = new List<Tuple<int, List<ProductionReportEntry>, int>>();

How I can sort it by the last integer , that the result will be from high to Low .

Thanks for help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:02:26+00:00Added an answer on May 31, 2026 at 3:02 pm

    The easiest way is to use LINQ’s OrderByDescending() extension method, it will sort your list in descending order from high to low and push it back into the list:

    result = result.OrderByDescending(t => t.Item3).ToList();
    

    That’s assuming you want to store it back int the original reference, of course you could assign it to another variable, etc…

    Alternatively, you could do an in-place sort using List.Sort()‘s overload that takes a Comparisson<T> delegate:

    // does descending since we put r on the lhs and l on the rhs...
    result.Sort((l, r) => r.Item3.CompareTo(l.Item3));
    

    Alternatively, you could build a custom IComparer<T>, of course for your Tuple<int, List<PropertyReportEntry>, int> but that gets pretty ugly looking…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code snippet in C#: var actions = new List<Func<int>>(); IEnumerable<int>
I have the following node /html[1]/body[1]/div[1]/div[1]/div[3]/div[1]/div[7]/p[1]/#text[1] How can I figure out that the last
I have the following code: public void DeleteAccountsForMonth(int year, int month) { var result
Having the following: var categories = new List<double> {10,20,30,40}; // Note the 40 here...
I have a list of items that can be represented like this: ClientNo Name
I have following code in Generic Handler of Asp.net: var students= Student.GetStudents(); var result
I have the following code: var request = new GeocodingRequest(); request.Address = postcode; request.Sensor
I have the following LINQ conditional where clause query that produces a result of
Say I have two lists: var list1 = new int[] {1, 2, 3}; var
I have the following var: filter = { country: 1, Age Group: {}, Gender:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.