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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      151 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X