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

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay