你可以这样-
int[] terms = new int[400];for (int runs = 0; runs < 400; runs++){ terms[runs] = value;}另外,您也可以使用列表-列表的优势在于,实例化列表时无需知道数组大小。
List<int> termsList = new List<int>();for (int runs = 0; runs < 400; runs++){ termsList.Add(value);}// You can convert it back to an array if you would like toint[] terms = termsList.ToArray();编辑: 一个) 用于 上列表
上列表



