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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X