asp.net中如何获取一个数组的长度?

asp.net中如何获取一个数组的长度?

很简单啊
例如你有一个数组 string[] stus 他的长度就是 stus.length
记住数组时从0开始的
温馨提示:内容为网友见解,仅供参考
第1个回答  2009-12-09
int[] arr = {1,1,2,2,33,2,1,23,213,12,3};
Console.WriteLine(arr.Length.ToString());
第2个回答  2009-12-09
int[] a = new int[10];
MessageBox.Show(a.Length.ToString());
第3个回答  2009-12-10
string [] str = {"","","",""};
str.Length();
第4个回答  2009-12-09
uBound(数组名字)
相似回答