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 154 views
1 answer 192 views
1 answer 173 views
1 answer 162 views
1 answer 305 views
1 answer 218 views
1 answer 181 views
...