C#数组能不定义长度吗?

来源:百度知道 编辑:UC知道 时间:2024/06/02 20:21:37

可以的。举个例子string[] sg=new string[10];
10就是数组的长度

可以。
譬如
int [] a;
a=new int [5];

array 固长
arraylist 自适应长度.

System.Collections.ArrayList
System.Collections.Generic.List<T>
都可以