C#控制台基础 用for循环遍历arraylist集合,
分享于 点击 27846 次 点评:95
C#控制台基础 用for循环遍历arraylist集合,
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- ArrayList list = new ArrayList();
- list.Add(1);
- list.Add(3.23);
- for (int i = 0; i < list.Count; i++)
- {
- Console.WriteLine(list[i]);
- }
- Console.ReadKey();
- }
- }
- }
相关文章
- 暂无相关文章
用户点评