I want to organize a list that was generated randonly in Crescent/Decrescent (Most needed is Crescent decrescent is for knownledge). Thank you.
List<int> jogo = new List<int>(16); //The kind of list and it's nameLoading
I want to organize a list that was generated randonly in Crescent/Decrescent (Most needed is Crescent decrescent is for knownledge). Thank you.
List<int> jogo = new List<int>(16); //The kind of list and it's nameKnow the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Mar 19, 2008, 8:19 AM
Thanks for that, Sergio.
I'm a bit of an evangelist for C# and so it's good to help people who are new to the language :-)
Sergio FonsecaPosted Mar 18, 2008, 9:19 PM
I've growed a lot in C# since I joined this forum. Also I'm your fan. Your ever helping this forum's peoples and It's so cool for beginners have an advanced person to help us.
AlanPosted Mar 18, 2008, 7:41 PM
To organize the list into ascending order use:
jogo.Sort();
For descending order, either read the sorted list backwards or apply the Reverse method to it:
jogo.Reverse();