Back to Freecodecamp

Guided Project - Develop Conditional Branching and Looping Structures in C#

curriculum/challenges/english/blocks/add-logic-to-c-sharp-console-applications/647e217e8acb466c97ccbee4.md

latest1.5 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/guided-project-develop-conditional-branching-looping/" target="_blank" rel="noreferrer">https://learn.microsoft.com/training/modules/guided-project-develop-conditional-branching-looping/</a> and complete all the tasks for the "Guided Project - Develop Conditional Branching and Looping Structures in C#" module. This is required to earn the "Add Logic to 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/guided-project-develop-conditional-branching-looping/" target="_blank" rel="noreferrer">Develop Conditional Branching and Looping Structures in C#</a> guided project on Microsoft Learn. Then, answer the question below.

--questions--

--text--

When is it appropriate to use a switch-case construct rather than a if-elseif-else construct?

--answers--

A switch-case construct is appropriate when more than 2-3 else if code blocks are required.


A switch-case construct is appropriate when the number of case patterns is small.


A switch-case construct is appropriate when the selection statement is inside a loop.

--video-solution--

1