I would like to sort my int array in ascending order.
first I make a copy of my array:
int[] copyArray = myArray.ToArray();
Then I would like to sort it in ascending order like this:
int[] sortedCopy = from element in copyArray
orderby element ascending select element;
But I get a error, "selected" gets highligted and the error is:
"cannot implicitly convert type 'system.linq.iorderedenumerable' to 'int[]'"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…