循环遍历下就好了- string[] array = new string[] { "1", "2", " 3", "4", " 5" };
- ArrayList arraylist = new ArrayList();
- for (int i = 0; i < array.Length; i++)
- {
- arraylist.Add(array.GetValue(i));
- }
- for (int i = 0; i < arraylist.Count; i++)
- {
- Console.Write(arraylist[i] + "\t");
- }
- Console.ReadKey();
复制代码
|