[C#] C#通过foreach语句遍历arraylist代码演示 →→→→→进入此内容的聊天室

来自 , 2021-01-19, 写在 C#, 查看 150 次.
URL http://www.code666.cn/view/5ba91a75
  1. /*
  2.  * C# Programmers Pocket Consultant
  3.  * Author: Gregory S. MacBeth
  4.  * Email: gmacbeth@comporium.net
  5.  * Create Date: June 27, 2003
  6.  * Last Modified Date:
  7.  */
  8. using System;
  9. using System.Collections;
  10.  
  11. namespace Client.Chapter_4___Program_Control
  12. {
  13.   public class ForEaches
  14.   {
  15.     static void Main(string[] args)
  16.     {
  17.       ArrayList a = new ArrayList(10);
  18.  
  19.       foreach (int x in a)
  20.       {
  21.         Console.WriteLine(x);
  22.       }
  23.     }
  24.   }
  25. }
  26. //csharp/7625

回复 "C#通过foreach语句遍历arraylist代码演示"

这儿你可以回复上面这条便签

captcha