How to sort a string in ascending 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.OrderBy(Function(ch) ch))
			
        Console.WriteLine(s)
	End Sub
End Module




' run:
' 
' 
'     #++aaccchjnoptvy
'

 



answered Mar 27, 2021 by avibootz

Related questions

1 answer 155 views
1 answer 192 views
1 answer 175 views
1 answer 164 views
1 answer 307 views
1 answer 219 views
1 answer 183 views
...