Me gustaría ordenar mi matriz int en orden ascendente.Ordenar una matriz int con ordenby
primero hago una copia de mi matriz:
int[] copyArray = myArray.ToArray();
entonces me gustaría para ordenarla en orden ascendente de esta manera:
int[] sortedCopy = from element in copyArray
orderby element ascending select element;
Pero me sale un error, "seleccionado" recibe highligted y el error es: "no se puede convertir implícitamente el tipo 'system.linq.iorderedenumerable' a 'int []'"
¿Qué estás haciendo ahora con sortedCopy? Quizás no necesites una matriz. – weston