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 8554257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:50:25+00:00 2026-06-11T14:50:25+00:00

I have a list, winningCombos, of type class winningCombo, which has a class of

  • 0

I have a list, winningCombos, of type class winningCombo, which has a class of type spin. Like so:

 public List<winningCombo> winningCombos;

  public class winningCombo
    {
        public List<spin> winningSymbols; 
        public double cumulativeValue;
    }


  public class spin
    {
        public string Name;
        public double Value;
    }

What is an efficient way to sort the list winningCombos in order by the value of the double cumaltiveValue within each class winningCombo? Some of these have the same value. So winningCombos[0] should be the smallest value of the double cumaltiveValue and work its way up. Thanks for any ideas!

  • 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-06-11T14:50:27+00:00Added an answer on June 11, 2026 at 2:50 pm

    This can be sorted in place via List<T>.Sort like so:

    winningCombos.Sort( (l, r) => l.cumulativeValue.CompareTo(r.cumulativeValue));
    

    You could also use LINQ to get back sorted results:

    var sorted = winningCombos.OrderBy(wc => wc.cumulativeValue);
    

    (Note the latter doesn’t change the original collection, but returns a new, sorted IEnumerable<winningCombo>.)

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

Sidebar

Related Questions

I have List<Custom> where Custom is class Custom { public int id; public String
I have List like this List<string> items = new List<string>(); items.Add(-); items.Add(.); items.Add(a-); items.Add(a.);
I have List<string> strs; double[] values; where the values array contains the value of
i have List of int which consists of value 0,0,0,1,2,3,4,0,0 now i like to
I have list of string which I want to add as option in select
I have List collection with around 35,000 strings Typical string looks like this: <i>füüs</i>ampri
I have list of some data items. Each has a method GetStyle which returns
i have list like that: <ul> <li><a...>...</a></li> <li>...</li> </ul> where both type of listelements
I have list of links, like: <div class=links> <a href=# class=link1>link 1</a> <a href=#
I have list of input area in the form with id like contact1_title, contact2_title,

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.