code_junkie

Using .Net how do I use the Sort method to sort an Array in reverse i.e. Z to A?

Nov 12th, 2011
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. Array.Sort(myarray, (a, b) => b.CompareTo(a));
  2.  
  3. Array.Sort(array,delegate(string a, string b)
  4. {
  5. return b.CompareTo(a);
  6. });
Add Comment
Please, Sign In to add comment