DEV Community

Rasheed K Mozaffar
Rasheed K Mozaffar

Posted on

3 1

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 👏🏼

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up