配列をコピーするには 配列をコピーするにはArray.Copyメソッドを使用します。
string[] authors = new string[3];
authors[0] = "Kent Beck";
authors[1] = "Martin Fowler";
authors[2] = "Tom Demarco"
string[] newAuthors = new string[authors.Length + 1];
Array.Copy(authors, newAuthors, authors.Length);
目次に戻る
| Copyright(c) 2008 WoodenSoldier Software |
|