Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

linkq list order by price

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    linkq list order by price

    I have a list of prices and I want to order them from highest price to the lowest price.

    this is what I have

    myList.OrderBy(o => o.PricePoint).ToList();

    How do i organize the list from Highest to lowest

    #2
    Hello ballboy11,

    You could try using OrderByDescending:

    Provides a set of static (Shared in Visual Basic) methods for querying objects that implement IEnumerable<T>.


    For this question you can find many examples by using google and searching for "C# order list highest to lowest" because you are using a C# List<T> object.
    I would like to receive a List sorted by Product.Name in descending order. Similar to the function below which sorts the list in ascending order, just in reverse, is this possible? var newList = list.



    I look forward to being of further assistance.

    Comment


      #3
      thank you for your service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      576 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X