Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

robwest http://www.andscene.com/

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Convert ArrayList to string[]

While seemingly obvious how to do this in .NET, it took a few tries to get this.
Given an ArrayList of strings, I wanted to convert it to a string array. Here's how.

string[] srtArray = arrList.ToArray(Type.GetType("System.String")) as string[];
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS