Back to Freecodecamp

Store and Iterate Through Sequences of Data Using Arrays and the foreach Statement in C#

curriculum/challenges/english/blocks/create-and-run-simple-c-sharp-console-applications/647e22058acb466c97ccbeec.md

latest1.2 KB
Original Source

--description--

This challenge will be partially completed on the Microsoft Learn platform. Follow these instructions to complete the challenge:

  1. Go to <a href="https://learn.microsoft.com/training/modules/csharp-arrays/" target="_blank" rel="noreferrer">https://learn.microsoft.com/training/modules/csharp-arrays/</a> and complete all the tasks for the "Store and Iterate Through Sequences of Data Using Arrays and the foreach Statement in C#" module. This is required to earn the "Create and Run Simple C# Console Applications" trophy on Microsoft Learn, and qualify for the certification exam.
  2. When you are finished, come back and correctly answer the question below.

--assignment--

Complete the <a href="https://learn.microsoft.com/training/modules/csharp-arrays/" target="_blank" rel="noreferrer">Store and Iterate Through Sequences of Data Using Arrays and the foreach Statement in C#</a> module on Microsoft Learn. Then, answer the question below.

--questions--

--text--

Which of the following foreach statements is syntactically correct?

--answers--

foreach (int value of values)


foreach (int value with values)


foreach (int value in values)

--video-solution--

3