Files
freeCodeCamp/curriculum/challenges/arabic/19-foundational-c-sharp-with-microsoft/write-your-first-code-using-c-sharp/perform-basic-string-formatting-in-c-sharp.md
2023-06-29 11:19:11 -07:00

1.0 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
647e23828acb466c97ccbf03 Perform Basic String Formatting in C# 19 perform-basic-string-formatting-in-c-sharp

--description--

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

  1. Go to https://learn.microsoft.com/en-us/training/modules/csharp-basic-formatting/ and complete all the tasks for the "Perform Basic String Formatting in C#" module. This is required to earn the "Write Your First Code Using C#" trophy.
  2. When you are finished, come back and correctly answer the question below.

--question--

--text--

Which of the following lines of code correctly uses string interpolation assuming that the variable value is a string?

--answers--

'Console.WriteLine(@"My value: {value}");''


'Console.WriteLine($"My value: {value}");'


'Console.WriteLine(@"My value: [value]");'

--video-solution--

2