Back to Freecodecamp

Write Your First C# Method

curriculum/challenges/english/blocks/create-methods-in-c-sharp-console-applications/647e226a8acb466c97ccbef1.md

latest1.1 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/write-first-c-sharp-method/" target="_blank" rel="noreferrer">https://learn.microsoft.com/training/modules/write-first-c-sharp-method/</a> and complete all the tasks for the "Write Your First C# Method" module. This is required to earn the "Create Methods in 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/write-first-c-sharp-method/" target="_blank" rel="noreferrer">Write Your First C# Method</a> module on Microsoft Learn. Then, answer the question below.

--questions--

--text--

Which of the following correctly declares a method?

--answers--

DisplayNumbers();


void DisplayNumbers{};


void DisplayNumbers() { }

--video-solution--

3