May 2, 2011

Beauty of foreach loop in C#

foreach (int  temp in ArrayItem)
{
     // statement 1
     // statement 2
     // statement 3
        ................
        ................

}
Here no need to increment counter.

No comments:

Post a Comment