C # program to sort a string in descending order using library function
using System ; class GFG { static void descOrder ( char [ ] s ) { Array . Sort ( s ) ; reverse ( s ) ; } static void reverse ( char [ ] a ) { int i , n = a . Length ; char t ; for ( i = 0 ; i < n / 2 ; i ++ ) { t = a [ i ] ; a [ i ] = a [ n - i - 1 ] ; a [ n - i - 1 ] = t ; } }