c# - How do I store an array of strings into another array of strings? -


i'm trying store old array of struct type holds first names of people new string array has been downsized can shuffle round in method.

string[] newstringarray = new string[10]  (int = 0; < oldstringarray.length; i++) {         newstringarray = oldstringarray[i].firstname;//cannot convert type 'string 'string[]' }  foreach (string value in newstringarray) {     console.writeline(value); } 

it looks forgot index accessor:

string[] newstringarray = new string[10]; (int = 0; < oldstringarray.length && < newstringarray.length; i++) {     newstringarray[i] = oldstringarray[i].firstname;     //             ^ } 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -