Click here to Skip to main content
15,886,074 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a three-dimensional list and I want to sort every column with LINQ. Please guide me...
C#
List<List<List<float>>> matrix = new List<List<List<float>>>();
Posted
Updated 1-Nov-11 23:10pm
v4

1 solution

If the declaration of your list is: List<List<List<float>>> matrix;, you can sort it as the following:


C#
matrix.ForEach(l1 => l1.ForEach(l2 => l2.Sort()));
 
Share this answer
 
Comments
Mehdi Gholam 2-Nov-11 4:42am    
my 5!
vahid_erad 2-Nov-11 5:07am    
tnx dear
but what is 11 and 12 ???
Shmuel Zang 2-Nov-11 5:21am    
It isn't 11 and 12 it's l1 and l2. You can read more about lambda-expressions here.
Shmuel Zang 2-Nov-11 5:17am    
Thank you Mehdi.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900