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));

No comments:

Post a Comment