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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      35 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      12 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      18 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      20 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X