Converting an ArrayList to a String[] Array

ArrayList fileArrayList = new ArrayList();

//Populate fileArrayList

...

string[] files = fileArrayList.ToArray( typeof( string ) ) as string[];

I prefer the as command versus the old style boxing methods.

Comments

Popular posts from this blog

C# Form Application in Kiosk Mode/Fullscreen

C# using a transaction with ODBC

Antialiasing Text with C#