Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# sort array of objects by multiple properties

//asc order
List<Order> SortedList = objListOrder.OrderBy(o=>o.OrderDate).ThenBy(o=>o.ShipName).ToList();
// desc order
List<Order> SortedList = objListOrder.OrderByDescending(o=>o.OrderDate).ThenByDescending(o=>o.ShipName).ToList();
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# close 1 form open another form 
Csharp :: c# dictionary get highest key 
Csharp :: no move arrows unity 
Csharp :: uni valued tree 
Csharp :: string from byte array c# 
Csharp :: detect trigger in unity 
Csharp :: set label position winforms 
Csharp :: vb.net open file with default program 
Csharp :: unity set sprite transparency 
Csharp :: unity how to change the text on a button 
Csharp :: C# check if is first run 
Csharp :: move object to mouse unity 
Csharp :: How to add a label programatically in c# 
Csharp :: c# + longest streak in strings 
Csharp :: c# console play sound 
Csharp :: conditional blazor styles 
Csharp :: get distinct from datatable c# 
Csharp :: bubble sort in c# 
Csharp :: data annotation c# name 
Csharp :: c# odd even median 
Csharp :: unity dictionary check if key exists 
Csharp :: unity how to get the first word from string 
Csharp :: tooltips unity 
Csharp :: how to map datatable to list in c# 
Csharp :: how to move towards an object unity 
Csharp :: tostring tmpro unity 
Csharp :: random in unity 
Csharp :: c# 
Csharp :: how to make font c# 
Csharp :: how to print dictionary in c# 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =