-5
考慮:儲存 '的foreach' 循環的每個值轉換成字符串數組
string[] collection = new string[3]{"hi","hello","test"};
string [] elements = new string [3];
int index = 0;
foreach(string anode in collection)
{
string[index++] = anode;
}
什麼是'somecollection'?你知道它會有(不超過)三個元素嗎?每個元素需要什麼字符串? – 2013-03-26 22:17:54