ordering multi-file selection in C#

csharp United States
  • 18 years ago

    I am tring to create an array list of files selected form the OpenFileDialog class in the order that the files were selected. The problem is that the .FileNames property returns a string array of the selected files in numberical order (all except the last selected file). That is, if I select the following file names (while holding down the ctrl key) in the order of:


    5.myfile
    3.myfile
    1.myfile
    2.myfile


    The array returned from the .FileNames property is:


    1.myfile
    3.myfile
    5.myfile
    2.myfile


    I would like to select all the files I want at the same time and in the order I selected them. Can anyone suggest another way? I would rather not create a whole new class for file select because I am new to C#, this is my first program in C#.


    Thanks,
    edbock123

Post a reply

No one has replied yet! Why not be the first?

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

Contribute

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.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson