我有6个数组列表,我想知道哪一个是最长的,而不使用一堆IF语句。比较多个arraylist长度找到最长的一个
“if arraylistist.count> anotherlist.count Then ....”< - 反正这样做不是这样吗?
在VB.net或C#.Net(4.0)中的例子会很有帮助。
arraylist1.count
arraylist2.count
arraylist3.count
arraylist4.count
arraylist5.count
arraylist6.count
DIM longest As integer = .... 'the longest arraylist should be stored in this variable.
感谢
vb.net or c#?.. – 2012-01-17 14:05:43
您使用的是什么版本的.NET,什么是* exact *类型? (示例代码会很好...) – 2012-01-17 14:05:57
4.0。 c#.net或vb.net的例子很好 – tdjfdjdj 2012-01-17 14:06:54