1、ArrayList转换为数组
(1)方法1
ArrayList List = new ArrayList();
Int32[] values = (Int32[])List.ToArray(typeof(Int32));
(2)方法2
ArrayList List = new ArrayList();
Int32[] values = new Int32[List.Count];
List.CopyTo(values);
1、ArrayList转换为数组
(1)方法1
ArrayList List = new ArrayList();
Int32[] values = (Int32[])List.ToArray(typeof(Int32));
(2)方法2
ArrayList List = new ArrayList();
Int32[] values = new Int32[List.Count];
List.CopyTo(values);