Need your expert guidance as how to sort a 2D array, row-wise ( means considering each row independently and sort all rows independently of a 2D array) in Visual Studio C#.Example
First row: 5 4 3 6
Second row: 2 3 1 4
Sorted:
First row :3 4 5 6
Second row: 1 2 3 4
There is a method called Array.Sort (), but it is specific to 1D arrays only.
Thanks and Regards
Asad
If your 2D array is a jagged array like:
you can do it by using LINQ: