首页 > Windows开发 > 详细

C#通过foreach语句遍历arraylist源码演示

时间:2019-07-25 10:28:12      阅读:146      评论:0      收藏:0      [点我收藏+]
如下的代码是关于C#通过foreach语句遍历arraylist演示的代码。

using System;
using System.Collections;

namespace Client.Chapter_4___Program_Control
{
  public class ForEaches
  {
    static void Main(string[] args)
    {
      ArrayList a = new ArrayList(10);

      foreach (int x in a)
      {
        Console.WriteLine(x);
      }
    }
  }
}

C#通过foreach语句遍历arraylist源码演示

原文:https://blog.51cto.com/14393435/2423271

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!