foreach in 小例

class ForEachTest
{
    static void Main(string[] args)
    {
        int[] fearray = new int[] { 0, 1, 2, 3 };
        foreach (int i in fearray)
        {
            System.Console.WriteLine(i);
        }
    }
}


输出:

0

1

2

3

 

posted @ 2012-11-05 10:29  Liu66~  阅读(136)  评论(0编辑  收藏  举报