How to sort a string in descending order with VB.NET

1 Answer

0 votes
Imports System
Imports System.Linq
                 
Public Module Module1
    Public Sub Main()
        Dim s As String = "c# c java python c++"
         
        s = String.Concat(s.OrderByDescending(Function(ch) ch))
             
        Console.WriteLine(s)
    End Sub
End Module
 
 
 
 
' run:
' 
' 
' yvtponjhcccaa++#
'

 



answered Mar 27, 2021 by avibootz

Related questions

2 answers 275 views
1 answer 173 views
2 answers 201 views
...