sorting aray

  • 15 years ago
    Is there a way to sort items in array, in my case diar(). As shown below I read files from directory. files are named
    eg. (pic1, pic2, pic3, pic4, ..., pic10,... pic100,..)

    when i fill listbox or database with items from array items are sorted: (pic1, pic10, pic100, pic11, pic110, pic111, pic112)

    In my aplication, filename is readed from diar and saved in database.
    so when i read files they are not sorted

    Dim dir As DirectoryInfo = New DirectoryInfo(folder2)
    Dim diar As IO.FileInfo() = dir.GetFiles("*.*")

    For Each dra In diar

  • 15 years ago
    do try this
    forgive me if it  is wrong

    just wanted to help u
    i do not know whether it is correct or wrong

    give it a try and see

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Weeks of coding can save you hours of planning.”