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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      44 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      58 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      35 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      95 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      59 views
      0 likes
      Last Post PaulMohn  
      Working...
      X