Showing posts with label String[ ]Array. Show all posts
Showing posts with label String[ ]Array. Show all posts

Tuesday, March 16, 2010

Convert ArrayList String to String[ ] Array

Let we have a string[ ] array and a ArrayList of String. We would like to convert ArrayList to String[ ] .

static string[ ] userNameList;
ArrayList userNameAl = new ArrayList( );

userNameList = (string[ ])userNameAl.ToArray(typeof(string));