using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Foreach_test { class Program { static void Main() { int[] iarray = new int[] { 0,1,2,3,4,5,6,7,8,9}; foreach (int i in iarray) { Console.WriteLine("数据={0}", i); } } } }