DEV Community

Rasheed K Mozaffar
Rasheed K Mozaffar

Posted on

Sorting an array descendingly in C#

Hey yo!

Wanna learn a couple of easy C# array methods ?

Image description

This will sort a given array in an ascending order
Array.Sort(example array);

This will reverse the order of a given array
Array.Reverse(example array);

Hopefully you learned something new :)

Top comments (1)

Collapse
 
rasheedmozaffar profile image
Rasheed K Mozaffar

Oh , cool
I haven't learned LINQ yet , so I used the very basic way to do it .
Thanks for the advice 👏🏼