How to sort an array of strings in lexicographical (dictionary, alphabetical) order in VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Dim array As String() = New String() {"vb.net", "c", "c++", "c#", "python", "java"}

        System.Array.Sort(array)

        Dim element As String
        For Each element In array
            Console.WriteLine(element)
        Next

    End Sub

End Module

' run:
' 
' c
' c#
' c++
' java
' python
' vb.net

 



answered Jun 2, 2017 by avibootz
...