Examveda

In C#, what is the syntax for a 'for-each' loop?

A. for-each (type variable : collection) { }

B. for (type variable : collection) { }

C. foreach (type variable in collection) { }

D. for-each (type variable in collection) { }

Answer: Option C


Join The Discussion

Related Questions on Control Flow Statements in C Sharp