Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int[] copyArray = myArray.ToArray();
- int[] sortedCopy = from element in copyArray
- orderby element ascending select element;
- int[] sortedCopy = (from element in myArray orderby element ascending select element)
- .ToArray();
- int[] sortedCopy = myArray.OrderBy(i => i).ToArray();
- Array.Sort(myArray);
- Array.Sort(entityArray, (x,y) => string.Compare(x.Name, y.Name));
- var sortedCopy = entityArray.OrderBy(x => x.Name).ToArray();
- var sortedCopy = myArray.OrderBy(i => i);
- foreach(var item in sortedCopy)
- {
- //print out for example
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement