Vidyalelo
C# Programming · Q23

Control Flow Statements in C Sharp

Programming · C# Programming · question 23

Q23

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) { }
Answer
D.
for-each (type variable in collection) { }

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board